public function testTableGetterWhenTableWasSet() { $mockDbDriver = $this->getMock('Zend\\Db\\Adapter\\Driver\\DriverInterface'); $mockDbAdapter = $this->getMock('Zend\\Db\\Adapter\\Adapter', null, array($mockDbDriver)); $mockCustomerTable = $this->getMock('Customer\\Table\\CustomerTable', null, array($mockDbAdapter)); $customerService = new CustomerService(); $customerService->setCustomerTable($mockCustomerTable); $this->assertEquals($mockCustomerTable, $customerService->getCustomerTable()); }