예제 #1
0
 public function testgetClientNotFound()
 {
     $dbMock = $this->getMockBuilder('\\Box_Database')->getMock();
     $dbMock->expects($this->atLeastOnce())->method('findOne')->will($this->returnValue(array()));
     $di = new \Box_Di();
     $di['db'] = $dbMock;
     $service = new \Box\Mod\Client\Service();
     $service->setDi($di);
     $data = array('id' => 0);
     $this->setExpectedException('\\Box_Exception', 'Client not found');
     $service->get($data);
 }