public function testAnonymousPreload() { $t = new ModerationTestsuite(); $t->logout(); $ret = $t->doTestEdit(); $this->assertEquals($t->lastEdit['Text'], $t->html->getPreloadedText($t->lastEdit['Title']), "testAnonymousPreload(): Preloaded text differs from what the user saved before"); /* Now create an account and check that text can still be preloaded */ $username = '******'; $user = $t->createAccount($username); if (!$user) { $this->markTestIncomplete('testAnonymousPreload(): Failed to create account, most likely captcha is enabled.'); } $t->loginAs($user); $this->assertEquals($t->lastEdit['Text'], $t->html->getPreloadedText($t->lastEdit['Title']), "testAnonymousPreload(): Text was not preloaded after creating an account"); }