コード例 #1
0
 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());
 }
コード例 #2
0
 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());
 }