public function testServiceLocator() { $this->assertInstanceOf('Zend\\ServiceManager\\ServiceManager', $this->grid->getServiceLocator()); $serviceLocator = $this->getMock('Zend\\ServiceManager\\ServiceManager'); $this->grid->setServiceLocator($serviceLocator); $this->assertInstanceOf('Zend\\ServiceManager\\ServiceManager', $this->grid->getServiceLocator()); $this->assertEquals($serviceLocator, $this->grid->getServiceLocator()); }