Esempio n. 1
0
 public function testGetIterator()
 {
     $this->if($iterator = new testedClass($controller = new mock\controller()))->then->object($iterator->getIterator())->isEqualTo(new \arrayIterator($iterator->getMethods()))->if($controller->control(new \mock\mageekguy\atoum\tests\units\mock\controller\foo()))->then->object($iterator->getIterator())->isEqualTo(new \arrayIterator($iterator->getMethods()));
 }
Esempio n. 2
0
 public function testSetIterator()
 {
     $this->if($mockController = new testedClass())->then->object($mockController->setIterator($iterator = new mock\controller\iterator()))->isIdenticalTo($mockController)->object($mockController->getIterator())->isEqualTo($iterator)->object($iterator->getMockController())->isIdenticalTo($mockController)->object($mockController->setIterator())->isIdenticalTo($mockController)->object($mockController->getIterator())->isNotIdenticalTo($iterator)->isEqualTo(new mock\controller\iterator($mockController));
 }