public function testLogoutOnFailure() { $client = $this->getMockClient(); $client->expects($this->at(0))->method('post')->with(null, $this->getExpectedOptsForPostParams(array('action' => 'logout')))->will($this->returnValue($this->getMockResponse(null))); $api = new MediawikiApi($client); $this->assertFalse($api->logout()); }
public function testLogoutOnFailure() { $client = $this->getMockClient(); $client->expects($this->at(0))->method('request')->with('POST', null, $this->getExpectedRequestOpts(array('action' => 'logout'), 'form_params'))->will($this->returnValue($this->getMockResponse(null))); $api = new MediawikiApi('', $client); $this->assertFalse($api->logout()); }