MediaWiki
REL1_22
|
Tests for MediaWiki api.php?action=edit. More...
Public Member Functions | |
setUp () | |
setUp and tearDown should (where significant) happen in reverse order. | |
tearDown () | |
testEdit () | |
testEditAppend ($text, $op, $append, $expected) | |
provideEditAppend | |
testEditConflict () | |
testEditConflict_bug41990 () | |
testEditConflict_redirect () | |
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) |
Tests for MediaWiki api.php?action=edit.
API Database medium
Definition at line 12 of file ApiEditPageTest.php.
ApiEditPageTest::forceRevisionDate | ( | WikiPage $ | page, |
$ | timestamp | ||
) | [protected] |
Definition at line 408 of file ApiEditPageTest.php.
References $timestamp, array(), WikiPage\clear(), WikiPage\getLatest(), and wfGetDB().
Referenced by testEditConflict(), testEditConflict_bug41990(), and testEditConflict_redirect().
static ApiEditPageTest::provideEditAppend | ( | ) | [static] |
Definition at line 127 of file ApiEditPageTest.php.
setUp and tearDown should (where significant) happen in reverse order.
Reimplemented from ApiTestCase.
Definition at line 14 of file ApiEditPageTest.php.
References $wgContLang, cache, MWNamespace\getCanonicalNamespaces(), and global.
Reimplemented from MediaWikiTestCase.
Definition at line 31 of file ApiEditPageTest.php.
References $wgContLang, cache, MWNamespace\getCanonicalNamespaces(), and global.
Definition at line 46 of file ApiEditPageTest.php.
References $name, array(), and ApiTestCase\doApiRequestWithToken().
ApiEditPageTest::testEditAppend | ( | $ | text, |
$ | op, | ||
$ | append, | ||
$ | expected | ||
) |
provideEditAppend
Definition at line 153 of file ApiEditPageTest.php.
References $count, $name, array(), ApiTestCase\doApiRequestWithToken(), list, and Title\newFromText().
Definition at line 269 of file ApiEditPageTest.php.
References $count, $name, $title, array(), ApiTestCase\doApiRequestWithToken(), WikiPage\factory(), fail, forceRevisionDate(), UsageException\getCodeString(), Title\newFromText(), and user.
Definition at line 361 of file ApiEditPageTest.php.
References $count, $name, $title, array(), ApiTestCase\doApiRequestWithToken(), WikiPage\factory(), forceRevisionDate(), list, Title\newFromText(), and user.
Definition at line 305 of file ApiEditPageTest.php.
References $count, $name, $title, array(), ApiTestCase\doApiRequestWithToken(), WikiPage\factory(), fail, forceRevisionDate(), UsageException\getCodeString(), 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 236 of file ApiEditPageTest.php.
References $name, array(), ApiTestCase\doApiRequestWithToken(), WikiPage\factory(), list, Title\newFromText(), and Revision\RAW.
Test editing of sections.
Definition at line 199 of file ApiEditPageTest.php.
References $name, array(), ApiTestCase\doApiRequestWithToken(), WikiPage\factory(), fail, UsageException\getCodeString(), list, ContentHandler\makeContent(), Title\newFromText(), and Revision\RAW.
Definition at line 100 of file ApiEditPageTest.php.
References $name, array(), ApiTestCase\doApiRequestWithToken(), WikiPage\factory(), and Title\newFromText().