Beispiel #1
0
 /**
  * @test
  */
 public function purgeCurrentForSecondOfTwoElementsInWhileLoopDoesNotChangeNumberOfIterations()
 {
     $this->addModelsToFixture(array('', ''));
     $completedIterations = 0;
     while ($this->subject->valid()) {
         if ($completedIterations === 1) {
             $this->subject->purgeCurrent();
         }
         $completedIterations++;
         $this->subject->next();
     }
     self::assertSame(2, $completedIterations);
 }