public function testIteratorInterface_ChangingCollectionSizeWhileIterating_ExpectsException() { $this->ninja->amGoingTo('Change the collection size while iterating over it'); $this->setExpectedException('Exception'); foreach ($this->mockModel as $item) { $this->mockModel->setNumberOfIterations(10); } }
public static function createMock() { $mock = new FrontendMock(); $mock->setMessage(self::$message); $mock->setNumberOfIterations(self::$numberOfIterations); return $mock; }