public function testGet() { $clientService = $this->getMockBuilder('\\Box\\Mod\\Client\\Service')->getMock(); $clientService->expects($this->atLeastOnce())->method('toApiArray')->will($this->returnValue(array())); $di = new \Box_Di(); $di['mod_service'] = $di->protect(function () use($clientService) { return $clientService; }); $this->clientApi->setDi($di); $this->clientApi->setIdentity(new \Model_Client()); $result = $this->clientApi->get(); $this->assertInternalType('array', $result); }