Fix session handling in API test cases.
authordaniel <daniel.kinzler@wikimedia.de>
Thu, 21 Jun 2012 20:25:37 +0000 (22:25 +0200)
committerdaniel <daniel.kinzler@wikimedia.de>
Thu, 21 Jun 2012 20:29:19 +0000 (22:29 +0200)
commit7d3d38748abaaeeee19de82453ee6026438508ad
tree7598b2dbf4b6ae2969edef7af1c4cce01f09c32e
parentc62cc318d9cacd1b416703b7fd4d61b00f4b98ad
Fix session handling in API test cases.

* Use the API module's own context to check edit tokens.
* Use the global session if none is provided to doApiRequest.
* Fix ApiFlockTest to not pass an empty session, so the tokens from
  the global request can be used.

Change-Id: I2bff2390f43beb984b1b451bcf4e41271b2f054f
includes/api/ApiMain.php
tests/phpunit/includes/api/ApiBlockTest.php
tests/phpunit/includes/api/ApiTestCase.php