|
76 | 76 | use TheCodingMachine\TDBM\Test\Dao\Generated\UserBaseDao;
|
77 | 77 | use TheCodingMachine\TDBM\Test\Dao\InheritedObjectDao;
|
78 | 78 | use TheCodingMachine\TDBM\Test\Dao\NodeDao;
|
| 79 | +use TheCodingMachine\TDBM\Test\Dao\PersonDao; |
79 | 80 | use TheCodingMachine\TDBM\Test\Dao\RefNoPrimKeyDao;
|
80 | 81 | use TheCodingMachine\TDBM\Test\Dao\RoleDao;
|
81 | 82 | use TheCodingMachine\TDBM\Test\Dao\StateDao;
|
@@ -747,8 +748,9 @@ public function testFindFromRawSqlOrderByUserCount(): void
|
747 | 748 | $countryDao = new TestCountryDao($this->tdbmService);
|
748 | 749 | $countries = $countryDao->getCountriesByUserCount();
|
749 | 750 |
|
750 |
| - $this->assertCount(4, $countries); |
751 |
| - for ($i = 1; $i < count($countries); $i++) { |
| 751 | + $nbCountries = 4; |
| 752 | + $this->assertCount($nbCountries, $countries); |
| 753 | + for ($i = 1; $i < $nbCountries; $i++) { |
752 | 754 | $this->assertLessThanOrEqual($countries[$i - 1]->getUsers()->count(), $countries[$i]->getUsers()->count());
|
753 | 755 | }
|
754 | 756 | }
|
@@ -2169,4 +2171,11 @@ public function testMethodNameConflictsBetweenRegularAndAutoPivotProperties(): v
|
2169 | 2171 | $artist->getChildrenByArtistsRelations(); // auto-pivot relationship
|
2170 | 2172 | $this->assertEquals(1, 1);
|
2171 | 2173 | }
|
| 2174 | + |
| 2175 | + public function testFindByDateTime(): void |
| 2176 | + { |
| 2177 | + $personDao = new PersonDao($this->tdbmService); |
| 2178 | + $personDao->findByModifiedAt(new \DateTimeImmutable('+1 year'))->count(); |
| 2179 | + $this->assertTrue(true); |
| 2180 | + } |
2172 | 2181 | }
|
0 commit comments