MediaWiki  REL1_24
ApiEditPageTest Class Reference

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

Inheritance diagram for ApiEditPageTest:
Collaboration diagram for ApiEditPageTest:

List of all members.

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&section=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 ()

Detailed Description

Tests for MediaWiki api.php?action=edit.

Author:
Daniel Kinzler

API Database medium

ApiEditPage

Definition at line 14 of file ApiEditPageTest.php.


Member Function Documentation

ApiEditPageTest::forceRevisionDate ( WikiPage page,
timestamp 
) [protected]
Returns:
array

Definition at line 129 of file ApiEditPageTest.php.

References array(), empty, and page.

ApiEditPageTest::tearDown ( ) [protected]

Reimplemented from MediaWikiTestCase.

Definition at line 40 of file ApiEditPageTest.php.

References cache, and MWNamespace\getCanonicalNamespaces().

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().

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&section=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.


The documentation for this class was generated from the following file: