Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed May 1, 2024
1 parent be6e4a5 commit 1385d44
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/Galette/Repository/tests/units/Members.php
Expand Up @@ -150,7 +150,7 @@ private function createMembers(): void
'date_enreg' => $begin_date->format('Y-m-d'),
'date_debut_cotis' => $begin_date->format('Y-m-d'),
'date_fin_cotis' => $due_date->format('Y-m-d'),
\Galette\Entity\ContributionsTypes::PK => \Galette\Entity\ContributionsTypes::DEFAULT_TYPE
\Galette\Entity\ContributionsTypes::PK => 1 // annual fee
];
$this->assertTrue($contrib->check($cdata, [], []));
$this->assertTrue($contrib->store());
Expand Down Expand Up @@ -507,22 +507,22 @@ public function testGetList(): void

//search on contribution type
$filters = new \Galette\Filters\AdvancedMembersList();
$filters->contributions_types = \Galette\Entity\ContributionsTypes::DEFAULT_TYPE;
$filters->contributions_types = 1;
$members = new \Galette\Repository\Members($filters);
$list = $members->getList();

$this->assertSame(1, $list->count());

$filters->contributions_types = [
\Galette\Entity\ContributionsTypes::DEFAULT_TYPE,
\Galette\Entity\ContributionsTypes::DEFAULT_TYPE + 1
1, // annual fee
2 //reduced annual fee
];
$members = new \Galette\Repository\Members($filters);
$list = $members->getList();

$this->assertSame(1, $list->count());

$filters->contributions_types = \Galette\Entity\ContributionsTypes::DEFAULT_TYPE + 1;
$filters->contributions_types = 2;
$members = new \Galette\Repository\Members($filters);
$list = $members->getList();

Expand Down Expand Up @@ -983,7 +983,7 @@ public function testGetRemindersCount(): void
'date_enreg' => $begin_date->format('Y-m-d'),
'date_debut_cotis' => $begin_date->format('Y-m-d'),
'date_fin_cotis' => $due_date->format('Y-m-d'),
\Galette\Entity\ContributionsTypes::PK => \Galette\Entity\ContributionsTypes::DEFAULT_TYPE
\Galette\Entity\ContributionsTypes::PK => 1 // annual fee
];
$this->assertTrue($contrib->check($cdata, [], []));
$this->assertTrue($contrib->store());
Expand Down Expand Up @@ -1014,7 +1014,7 @@ public function testGetRemindersCount(): void
'date_enreg' => $begin_date->format('Y-m-d'),
'date_debut_cotis' => $begin_date->format('Y-m-d'),
'date_fin_cotis' => $due_date->format('Y-m-d'),
\Galette\Entity\ContributionsTypes::PK => \Galette\Entity\ContributionsTypes::DEFAULT_TYPE
\Galette\Entity\ContributionsTypes::PK => 1 // annual fee
];
$this->assertTrue($contrib->check($cdata, [], []));
$this->assertTrue($contrib->store());
Expand Down Expand Up @@ -1055,7 +1055,7 @@ public function testGetRemindersCount(): void
'date_enreg' => $begin_date->format('Y-m-d'),
'date_debut_cotis' => $begin_date->format('Y-m-d'),
'date_fin_cotis' => $due_date->format('Y-m-d'),
\Galette\Entity\ContributionsTypes::PK => \Galette\Entity\ContributionsTypes::DEFAULT_TYPE
\Galette\Entity\ContributionsTypes::PK => 1 // annual fee
];
$this->assertTrue($contrib->check($cdata, [], []));
$this->assertTrue($contrib->store());
Expand Down Expand Up @@ -1092,7 +1092,7 @@ public function testGetRemindersCount(): void
'date_enreg' => $begin_date->format('Y-m-d'),
'date_debut_cotis' => $begin_date->format('Y-m-d'),
'date_fin_cotis' => $due_date->format('Y-m-d'),
\Galette\Entity\ContributionsTypes::PK => \Galette\Entity\ContributionsTypes::DEFAULT_TYPE
\Galette\Entity\ContributionsTypes::PK => 1 // annual fee
];
$this->assertTrue($contrib->check($cdata, [], []));
$this->assertTrue($contrib->store());
Expand Down

0 comments on commit 1385d44

Please sign in to comment.