public function test_get_setController() { $controller = new Controller(new MockMapper()); $this->factoryMock->expects($this->once())->method('getTypeByName')->with('test')->will($this->returnValue($controller)); $this->assertEquals($controller, $this->manager->getType('test')); }