X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fapi%2FApiCreateAccountTest.php;h=35905c55644672c7420e132250976b59a8492a51;hb=94ba53f67731b0553a6178841d9506e384f74496;hp=3945102bb740335c6d72e542d1df4f1bc87aaf30;hpb=38ba6b620be9f6333d902055ae1c0c610af4985e;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/api/ApiCreateAccountTest.php b/tests/phpunit/includes/api/ApiCreateAccountTest.php index 3945102bb7..35905c5564 100644 --- a/tests/phpunit/includes/api/ApiCreateAccountTest.php +++ b/tests/phpunit/includes/api/ApiCreateAccountTest.php @@ -10,7 +10,6 @@ class ApiCreateAccountTest extends ApiTestCase { protected function setUp() { parent::setUp(); - LoginForm::setCreateaccountToken(); $this->setMwGlobals( array( 'wgEnableEmail' => true ) ); } @@ -114,7 +113,7 @@ class ApiCreateAccountTest extends ApiTestCase { public function testNoName() { $this->doApiRequest( array( 'action' => 'createaccount', - 'token' => LoginForm::getCreateaccountToken(), + 'token' => LoginForm::getCreateaccountToken()->toString(), 'password' => 'password', ) ); } @@ -127,7 +126,7 @@ class ApiCreateAccountTest extends ApiTestCase { $this->doApiRequest( array( 'action' => 'createaccount', 'name' => 'testName', - 'token' => LoginForm::getCreateaccountToken(), + 'token' => LoginForm::getCreateaccountToken()->toString(), ) ); } @@ -139,7 +138,7 @@ class ApiCreateAccountTest extends ApiTestCase { $this->doApiRequest( array( 'action' => 'createaccount', 'name' => 'Apitestsysop', - 'token' => LoginForm::getCreateaccountToken(), + 'token' => LoginForm::getCreateaccountToken()->toString(), 'password' => 'password', 'email' => 'test@domain.test', ) ); @@ -153,7 +152,7 @@ class ApiCreateAccountTest extends ApiTestCase { $this->doApiRequest( array( 'action' => 'createaccount', 'name' => 'Test User', - 'token' => LoginForm::getCreateaccountToken(), + 'token' => LoginForm::getCreateaccountToken()->toString(), 'password' => 'password', 'email' => 'invalid', ) );