コード例 #1
0
 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);
     }
 }
コード例 #2
0
 public static function createMock()
 {
     $mock = new FrontendMock();
     $mock->setMessage(self::$message);
     $mock->setNumberOfIterations(self::$numberOfIterations);
     return $mock;
 }