aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/content/ContentModelChangeTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/content/ContentModelChangeTest.php')
-rw-r--r--tests/phpunit/includes/content/ContentModelChangeTest.php21
1 files changed, 9 insertions, 12 deletions
diff --git a/tests/phpunit/includes/content/ContentModelChangeTest.php b/tests/phpunit/includes/content/ContentModelChangeTest.php
index 55857e2caad9..d73a1dfe523c 100644
--- a/tests/phpunit/includes/content/ContentModelChangeTest.php
+++ b/tests/phpunit/includes/content/ContentModelChangeTest.php
@@ -79,12 +79,11 @@ class ContentModelChangeTest extends MediaWikiIntegrationTestCase {
public function testInvalidContent() {
$invalidJSON = 'Foo\nBar\nEaster egg\nT22281';
$wikipage = $this->getExistingTestPage( 'PageWithTextThatIsNotValidJSON' );
- $wikipage->doEditContent(
+ $wikipage->doUserEditContent(
ContentHandler::makeContent( $invalidJSON, $wikipage->getTitle() ),
+ $this->getTestSysop()->getUser(),
'EditSummaryForThisTest',
- EDIT_UPDATE | EDIT_SUPPRESS_RC,
- false,
- $this->getTestSysop()->getUser()
+ EDIT_UPDATE | EDIT_SUPPRESS_RC
);
$this->assertSame(
'wikitext',
@@ -164,12 +163,11 @@ class ContentModelChangeTest extends MediaWikiIntegrationTestCase {
*/
public function testContentModelCanBeUsedOn() {
$wikipage = $this->getExistingTestPage( 'ExistingPage' );
- $wikipage->doEditContent(
+ $wikipage->doUserEditContent(
ContentHandler::makeContent( 'Text', $wikipage->getTitle() ),
+ $this->getTestSysop()->getUser(),
'Ensure a revision exists',
- EDIT_UPDATE | EDIT_SUPPRESS_RC,
- false,
- $this->getTestSysop()->getUser()
+ EDIT_UPDATE | EDIT_SUPPRESS_RC
);
$this->assertSame(
'wikitext',
@@ -214,12 +212,11 @@ class ContentModelChangeTest extends MediaWikiIntegrationTestCase {
$wikipage = WikiPage::factory( $title );
$dummyContent = ContentHandler::getForModelID( 'testing' )->makeEmptyContent();
- $wikipage->doEditContent(
+ $wikipage->doUserEditContent(
$dummyContent,
+ $this->getTestSysop()->getUser(),
'EditSummaryForThisTest',
- EDIT_NEW | EDIT_SUPPRESS_RC,
- false,
- $this->getTestSysop()->getUser()
+ EDIT_NEW | EDIT_SUPPRESS_RC
);
$this->assertSame(
'testing',