Skip to content

Commit 65f0e4b

Browse files
committed
InnerResultIterator: test count after fetch
1 parent fe6ed17 commit 65f0e4b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/TDBMDaoGeneratorTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,17 @@ public function testPageJsonEncode(): void
961961
$this->assertCount(1, $msgDecoded);
962962
}
963963

964+
/**
965+
* @depends testDaoGeneration
966+
*/
967+
public function testInnerResultIteratorCountAfterFetch(): void
968+
{
969+
$userDao = new TestUserDao($this->tdbmService);
970+
$users = $userDao->getUsersByLoginStartingWith('j')->take(0, 4);
971+
$users->toArray(); // We force to fetch
972+
$this->assertEquals(3, $users->count());
973+
}
974+
964975
/**
965976
* @depends testDaoGeneration
966977
*/

0 commit comments

Comments
 (0)