|
MediaWiki
REL1_24
|
Tests for MediaWiki api.php?action=edit. More...


Public Member Functions | |
| testEdit () | |
| testEdit_redirect () | |
| Ensure we can edit through a redirect, if adding a section. | |
| testEdit_redirectText () | |
| Ensure we cannot edit through a redirect, if attempting to overwrite content. | |
| testEditAppend ($text, $op, $append, $expected) | |
| provideEditAppend | |
| testEditConflict () | |
| testEditConflict_bug41990 () | |
| testEditConflict_newSection () | |
| Ensure that editing using section=new will prevent simple conflicts. | |
| testEditNewSection () | |
| Test action=edit§ion=new Run it twice so we test adding a new section on a page that doesn't exist (bug 52830) and one that does exist. | |
| testEditSection () | |
| Test editing of sections. | |
| testNonTextEdit () | |
Static Public Member Functions | |
| static | provideEditAppend () |
Protected Member Functions | |
| forceRevisionDate (WikiPage $page, $timestamp) | |
| setUp () | |
| tearDown () | |
Tests for MediaWiki api.php?action=edit.
API Database medium
Definition at line 14 of file ApiEditPageTest.php.
| ApiEditPageTest::forceRevisionDate | ( | WikiPage $ | page, |
| $ | timestamp | ||
| ) | [protected] |
| WikiPage | $page | |
| string | int | $timestamp |
Definition at line 487 of file ApiEditPageTest.php.
References $timestamp, array(), WikiPage\clear(), WikiPage\getLatest(), and wfGetDB().
Referenced by testEdit_redirect(), testEdit_redirectText(), testEditConflict(), testEditConflict_bug41990(), and testEditConflict_newSection().
| static ApiEditPageTest::provideEditAppend | ( | ) | [static] |
Definition at line 129 of file ApiEditPageTest.php.
| ApiEditPageTest::setUp | ( | ) | [protected] |
Reimplemented from ApiTestCase.
Definition at line 16 of file ApiEditPageTest.php.
References $wgContLang, array(), cache, MWNamespace\getCanonicalNamespaces(), global, and MediaWikiTestCase\setMwGlobals().
| ApiEditPageTest::tearDown | ( | ) | [protected] |
Reimplemented from MediaWikiTestCase.
Definition at line 40 of file ApiEditPageTest.php.
References cache, and MWNamespace\getCanonicalNamespaces().
Definition at line 45 of file ApiEditPageTest.php.
References $name, array(), and ApiTestCase\doApiRequestWithToken().
Ensure we can edit through a redirect, if adding a section.
Definition at line 272 of file ApiEditPageTest.php.
References $count, $name, $title, array(), ApiTestCase\doApiRequestWithToken(), WikiPage\factory(), forceRevisionDate(), list, Title\newFromText(), and user.
Ensure we cannot edit through a redirect, if attempting to overwrite content.
Definition at line 318 of file ApiEditPageTest.php.
References $count, $name, $title, array(), ApiTestCase\doApiRequestWithToken(), WikiPage\factory(), forceRevisionDate(), UsageException\getCodeString(), Title\newFromText(), and user.
| ApiEditPageTest::testEditAppend | ( | $ | text, |
| $ | op, | ||
| $ | append, | ||
| $ | expected | ||
| ) |
provideEditAppend
Definition at line 155 of file ApiEditPageTest.php.
References $content, $count, $name, array(), ApiTestCase\doApiRequestWithToken(), list, and Title\newFromText().
Definition at line 363 of file ApiEditPageTest.php.
References $count, $name, $title, array(), ApiTestCase\doApiRequestWithToken(), WikiPage\factory(), forceRevisionDate(), UsageException\getCodeString(), Title\newFromText(), and user.
Definition at line 436 of file ApiEditPageTest.php.
References $count, $name, $title, array(), ApiTestCase\doApiRequestWithToken(), WikiPage\factory(), forceRevisionDate(), list, Title\newFromText(), and user.
Ensure that editing using section=new will prevent simple conflicts.
Definition at line 402 of file ApiEditPageTest.php.
References $count, $name, $title, array(), ApiTestCase\doApiRequestWithToken(), WikiPage\factory(), forceRevisionDate(), list, Title\newFromText(), and user.
Test action=edit§ion=new Run it twice so we test adding a new section on a page that doesn't exist (bug 52830) and one that does exist.
Definition at line 232 of file ApiEditPageTest.php.
References $name, array(), ApiTestCase\doApiRequestWithToken(), WikiPage\factory(), list, Title\newFromText(), and Revision\RAW.
Test editing of sections.
Definition at line 193 of file ApiEditPageTest.php.
References $e, $name, array(), ApiTestCase\doApiRequestWithToken(), WikiPage\factory(), UsageException\getCodeString(), list, ContentHandler\makeContent(), Title\newFromText(), and Revision\RAW.
Definition at line 99 of file ApiEditPageTest.php.
References $name, array(), ApiTestCase\doApiRequestWithToken(), WikiPage\factory(), and Title\newFromText().