public function testGetRouter() { $this->container->expects($this->once())->method('getInstanceOf')->with($this->equalTo('router_service'))->will($this->returnValue($this->getMock('IRouter'))); $this->assertThat($this->object->getRouter(), $this->isInstanceOf('IRouter')); }