コード例 #1
0
 /**
  * @dataProvider provideVersions
  */
 public function testGetVersion($apiValue, $expectedVersion)
 {
     $client = $this->getMockClient();
     $client->expects($this->exactly(1))->method('get')->with(null, $this->getExpectedOptsForGetParams(array('action' => 'query', 'meta' => 'siteinfo', 'continue' => '')))->will($this->returnValue($this->getMockResponse(array('query' => array('general' => array('generator' => $apiValue))))));
     $api = new MediawikiApi($client);
     $this->assertEquals($expectedVersion, $api->getVersion());
 }