pricePerImpressionRub(0))->toBe('0.45') // volume floored to >=1 ->and($p->pricePerImpressionRub(999))->toBe('0.45') ->and($p->pricePerImpressionRub(1000))->toBe('0.42') ->and($p->pricePerImpressionRub(4999))->toBe('0.42') ->and($p->pricePerImpressionRub(5000))->toBe('0.40') ->and($p->pricePerImpressionRub(9999))->toBe('0.40') ->and($p->pricePerImpressionRub(10000))->toBe('0.38') ->and($p->pricePerImpressionRub(49999))->toBe('0.38') ->and($p->pricePerImpressionRub(50000))->toBe('0.36') ->and($p->pricePerImpressionRub(500000))->toBe('0.36'); }); it('смета = объём показов × цена ступени', function () { $p = app(TelegramTariffService::class); // 500 показов → ступень 0.45 → 225.00 expect($p->estimateRub(500))->toBe('225.00') // 1000 показов → ступень 0.42 → 420.00 ->and($p->estimateRub(1000))->toBe('420.00') // 5000 показов → ступень 0.40 → 2000.00 ->and($p->estimateRub(5000))->toBe('2000.00') // 0 показов → 0.00 ->and($p->estimateRub(0))->toBe('0.00'); });