Esempio n. 1
0
 public function testcounter()
 {
     $database = $this->getMockBuilder('\\Box_Database')->getMock();
     $database->expects($this->atLeastOnce())->method('getAssoc')->will($this->returnValue(array()));
     $di = new \Box_Di();
     $di['db'] = $database;
     $clientService = new \Box\Mod\Client\Service();
     $clientService->setDi($di);
     $result = $clientService->counter();
     $this->assertInternalType('array', $result);
     $expected = array('total' => 0, \Model_Client::ACTIVE => 0, \Model_Client::SUSPENDED => 0, \Model_Client::CANCELED => 0);
 }