public function testLogout() { $service = $this->getMockBuilder('\\Box\\Mod\\Profile\\Service')->getMock(); $service->expects($this->atLeastOnce())->method('logoutClient')->will($this->returnValue(true)); $this->clientApi->setService($service); $result = $this->clientApi->logout(); $this->assertTrue($result); }