MediaWiki  REL1_23
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 ()
 testEditAppend ($text, $op, $append, $expected)
 provideEditAppend
 testEditConflict ()
 testEditConflict_bug41990 ()
 testEditConflict_redirect ()
 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]
Parameters:
WikiPage$page
string | int$timestamp

Definition at line 419 of file ApiEditPageTest.php.

References $timestamp, array(), WikiPage\clear(), WikiPage\getLatest(), and wfGetDB().

Referenced by testEditConflict(), testEditConflict_bug41990(), and testEditConflict_redirect().

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

ApiEditPageTest::testEditAppend ( text,
op,
append,
expected 
)

provideEditAppend

Definition at line 155 of file ApiEditPageTest.php.

References $count, $name, array(), ApiTestCase\doApiRequestWithToken(), list, and Title\newFromText().

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 240 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: