mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Fixed: [doc generation] fix summary budget
This commit is contained in:
@@ -43,7 +43,7 @@ final class SummaryBudgetTest extends TestCase
|
||||
[
|
||||
'sum' => 250.0,
|
||||
'comment' => '',
|
||||
'kind_id' => 'rental',
|
||||
'kind_id' => 1, // kind: rental
|
||||
],
|
||||
]);
|
||||
$queryCharges->setParameters(Argument::type('array'))
|
||||
@@ -57,7 +57,7 @@ final class SummaryBudgetTest extends TestCase
|
||||
[
|
||||
'sum' => 1500.0,
|
||||
'comment' => '',
|
||||
'kind_id' => 'salary',
|
||||
'kind_id' => 2, // kind: 'salary',
|
||||
],
|
||||
]);
|
||||
$queryResources->setParameters(Argument::type('array'))
|
||||
@@ -84,6 +84,7 @@ final class SummaryBudgetTest extends TestCase
|
||||
$rental = (new ChargeKind())->setKind('rental')->setName(['fr' => 'Rental']),
|
||||
$other = (new ChargeKind())->setKind('other')->setName(['fr' => 'Other']),
|
||||
]);
|
||||
$chargeRepository->find(1)->willReturn($rental);
|
||||
$chargeRepository->findOneByKind('rental')->willReturn($rental);
|
||||
$chargeRepository->findOneByKind('other')->willReturn($other);
|
||||
|
||||
@@ -92,6 +93,7 @@ final class SummaryBudgetTest extends TestCase
|
||||
$salary = (new ResourceKind())->setKind('salary')->setName(['fr' => 'Salary']),
|
||||
$misc = (new ResourceKind())->setKind('misc')->setName(['fr' => 'Misc']),
|
||||
]);
|
||||
$resourceRepository->find(2)->willReturn($salary);
|
||||
$resourceRepository->findOneByKind('salary')->willReturn($salary);
|
||||
$resourceRepository->findOneByKind('misc')->willReturn($misc);
|
||||
|
||||
@@ -108,8 +110,9 @@ final class SummaryBudgetTest extends TestCase
|
||||
|
||||
$household = new Household();
|
||||
$householdReflection = new \ReflectionClass($household);
|
||||
$householdReflection->getProperty('id')->setAccessible(true);
|
||||
$householdReflection->getProperty('id')->setValue($household, 1);
|
||||
$householdId = $householdReflection->getProperty('id');
|
||||
$householdId->setAccessible(true);
|
||||
$householdId->setValue($household, 1);
|
||||
$householdMember = (new HouseholdMember())->setPerson($person)
|
||||
->setStartDate(new \DateTimeImmutable('1 month ago'))
|
||||
;
|
||||
|
Reference in New Issue
Block a user