Перевод на доменную архитектуру
This commit is contained in:
15
tests/Unit/Reports/DepartmentLoadCalculatorTest.php
Normal file
15
tests/Unit/Reports/DepartmentLoadCalculatorTest.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
use App\Domain\Reports\Calculators\DepartmentLoadCalculator;
|
||||
|
||||
it('calculates department load percentage', function () {
|
||||
$calculator = new DepartmentLoadCalculator;
|
||||
|
||||
expect($calculator->calculate(27, 30))->toBe(90);
|
||||
});
|
||||
|
||||
it('returns zero when beds count is zero', function () {
|
||||
$calculator = new DepartmentLoadCalculator;
|
||||
|
||||
expect($calculator->calculate(27, 0))->toBe(0);
|
||||
});
|
||||
Reference in New Issue
Block a user