Пример #1
0
 public function testgetAdminCount()
 {
     $countResult = 3;
     $dbMock = $this->getMockBuilder('\\Box_Database')->getMock();
     $dbMock->expects($this->atLeastOnce())->method('getCell')->will($this->returnValue($countResult));
     $di = new \Box_Di();
     $di['db'] = $dbMock;
     $service = new \Box\Mod\Staff\Service();
     $service->setDi($di);
     $result = $service->getAdminsCount();
     $this->assertInternalType('int', $result);
     $this->assertEquals($countResult, $result);
 }