Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | class StatementIteratorTest extends DbalTestCase |
||
14 | { |
||
15 | public function testIteratorIterationCallsFetchOncePerStep() : void |
||
16 | { |
||
17 | $stmt = $this->createMock(Statement::class); |
||
18 | |||
19 | $calls = 0; |
||
20 | $this->configureStatement($stmt, $calls); |
||
21 | |||
22 | $stmtIterator = new StatementIterator($stmt); |
||
23 | |||
24 | $this->assertIterationCallsFetchOncePerStep($stmtIterator, $calls); |
||
25 | } |
||
26 | |||
27 | private function configureStatement(MockObject $stmt, int &$calls) : void |
||
39 | }); |
||
40 | } |
||
41 | |||
42 | private function assertIterationCallsFetchOncePerStep(Traversable $iterator, int &$calls) : void |
||
46 | } |
||
47 | } |
||
49 |