public function testhp_get_pairs() { $serviceMock = $this->getMockBuilder('\\Box\\Mod\\Servicehosting\\Service')->getMock(); $serviceMock->expects($this->atLeastOnce())->method('getHpPairs')->will($this->returnValue(array())); $this->api->setService($serviceMock); $result = $this->api->hp_get_pairs(array()); $this->assertInternalType('array', $result); }