Refactor ApiTestCase to get token from ApiQueryTokens
[lhc/web/wiklou.git] / tests / phpunit / includes / api / MockApiQueryBase.php
index 4bede51..9915a38 100644 (file)
@@ -1,11 +1,19 @@
 <?php
 class MockApiQueryBase extends ApiQueryBase {
+       private $name;
+
        public function execute() {
        }
 
-       public function getVersion() {
+       public function __construct( $name = 'mock' ) {
+               $this->name = $name;
+       }
+
+       public function getModuleName() {
+               return $this->name;
        }
 
-       public function __construct() {
+       public function getModulePath() {
+               return 'query+' . $this->getModuleName();
        }
 }