Beispiel #1
0
 public function testSetMockController()
 {
     $this->if($iterator = new testedClass())->then->object($iterator->setMockController($controller = new mock\controller()))->isIdenticalTo($iterator)->object($iterator->getMockController())->isIdenticalTo($controller)->object($iterator->setMockController($otherController = new mock\controller()))->isIdenticalTo($iterator)->object($iterator->getMockController())->isIdenticalTo($otherController);
 }
Beispiel #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));
 }