aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/unit/includes/editpage
diff options
context:
space:
mode:
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>2021-04-23 14:43:04 +0000
committerGerrit Code Review <gerrit@wikimedia.org>2021-04-23 14:43:04 +0000
commit89b00fcfbe966092f405f0cc939eb6f052cf2a2b (patch)
tree436842e3898b57ceb305807d5aa1a1ea26374078 /tests/phpunit/unit/includes/editpage
parentb95a07380a64e72581a8bf41f466f58a1901ecb1 (diff)
parentc1ee8250e9bc9c9c3161ca0ded3946fd2af1da7d (diff)
downloadmediawikicore-89b00fcfbe966092f405f0cc939eb6f052cf2a2b.tar.gz
mediawikicore-89b00fcfbe966092f405f0cc939eb6f052cf2a2b.zip
Merge "Remove unnecessary ->equalTo() from tests"
Diffstat (limited to 'tests/phpunit/unit/includes/editpage')
-rw-r--r--tests/phpunit/unit/includes/editpage/Constraint/AutoSummaryMissingSummaryConstraintTest.php4
-rw-r--r--tests/phpunit/unit/includes/editpage/Constraint/ContentModelChangeConstraintTest.php4
-rw-r--r--tests/phpunit/unit/includes/editpage/Constraint/SelfRedirectConstraintTest.php2
-rw-r--r--tests/phpunit/unit/includes/editpage/Constraint/SpamRegexConstraintTest.php8
4 files changed, 9 insertions, 9 deletions
diff --git a/tests/phpunit/unit/includes/editpage/Constraint/AutoSummaryMissingSummaryConstraintTest.php b/tests/phpunit/unit/includes/editpage/Constraint/AutoSummaryMissingSummaryConstraintTest.php
index 66c3f67d3f6d..d9d395e02142 100644
--- a/tests/phpunit/unit/includes/editpage/Constraint/AutoSummaryMissingSummaryConstraintTest.php
+++ b/tests/phpunit/unit/includes/editpage/Constraint/AutoSummaryMissingSummaryConstraintTest.php
@@ -36,7 +36,7 @@ class AutoSummaryMissingSummaryConstraintTest extends MediaWikiUnitTestCase {
$newContent = $this->createMock( Content::class );
$newContent->expects( $this->once() )
->method( 'equals' )
- ->with( $this->equalTo( $originalContent ) )
+ ->with( $originalContent )
->willReturn( false );
$newContent->expects( $this->once() )
->method( 'isRedirect' )
@@ -56,7 +56,7 @@ class AutoSummaryMissingSummaryConstraintTest extends MediaWikiUnitTestCase {
$newContent = $this->createMock( Content::class );
$newContent->expects( $this->once() )
->method( 'equals' )
- ->with( $this->equalTo( $originalContent ) )
+ ->with( $originalContent )
->willReturn( false );
$newContent->expects( $this->once() )
->method( 'isRedirect' )
diff --git a/tests/phpunit/unit/includes/editpage/Constraint/ContentModelChangeConstraintTest.php b/tests/phpunit/unit/includes/editpage/Constraint/ContentModelChangeConstraintTest.php
index e133de1bbead..47fbf79f76a5 100644
--- a/tests/phpunit/unit/includes/editpage/Constraint/ContentModelChangeConstraintTest.php
+++ b/tests/phpunit/unit/includes/editpage/Constraint/ContentModelChangeConstraintTest.php
@@ -47,7 +47,7 @@ class ContentModelChangeConstraintTest extends MediaWikiUnitTestCase {
->willReturn( 'differentStartingContentModel' );
$title->expects( $this->once() )
->method( 'setContentModel' )
- ->with( $this->equalTo( $newContentModel ) );
+ ->with( $newContentModel );
$performer = $this->mockRegisteredAuthorityWithPermissions( [ 'edit', 'editcontentmodel' ] );
$constraint = new ContentModelChangeConstraint(
@@ -83,7 +83,7 @@ class ContentModelChangeConstraintTest extends MediaWikiUnitTestCase {
->willReturn( 'differentStartingContentModel' );
$title->expects( $this->once() )
->method( 'setContentModel' )
- ->with( $this->equalTo( $newContentModel ) );
+ ->with( $newContentModel );
$performer = $this->mockRegisteredAuthority( function (
string $permission,
diff --git a/tests/phpunit/unit/includes/editpage/Constraint/SelfRedirectConstraintTest.php b/tests/phpunit/unit/includes/editpage/Constraint/SelfRedirectConstraintTest.php
index 4fae9832e850..d782cae86fe4 100644
--- a/tests/phpunit/unit/includes/editpage/Constraint/SelfRedirectConstraintTest.php
+++ b/tests/phpunit/unit/includes/editpage/Constraint/SelfRedirectConstraintTest.php
@@ -42,7 +42,7 @@ class SelfRedirectConstraintTest extends MediaWikiUnitTestCase {
->willReturn( $contentRedirectTarget );
$contentRedirectTarget->expects( $this->once() )
->method( 'equals' )
- ->with( $this->equalTo( $title ) )
+ ->with( $title )
->willReturn( $isSelfRedirect );
return $content;
}
diff --git a/tests/phpunit/unit/includes/editpage/Constraint/SpamRegexConstraintTest.php b/tests/phpunit/unit/includes/editpage/Constraint/SpamRegexConstraintTest.php
index 8fabbb94703c..ce39e9869490 100644
--- a/tests/phpunit/unit/includes/editpage/Constraint/SpamRegexConstraintTest.php
+++ b/tests/phpunit/unit/includes/editpage/Constraint/SpamRegexConstraintTest.php
@@ -42,13 +42,13 @@ class SpamRegexConstraintTest extends MediaWikiUnitTestCase {
$spamChecker = $this->createMock( SpamChecker::class );
$spamChecker->expects( $this->once() )
->method( 'checkSummary' )
- ->with( $this->equalTo( $summary ) )
+ ->with( $summary )
->willReturn( false );
$spamChecker->expects( $this->exactly( 2 ) )
->method( 'checkContent' )
->withConsecutive(
- [ $this->equalTo( $sectionHeading ) ],
- [ $this->equalTo( $text ) ]
+ [ $sectionHeading ],
+ [ $text ]
)
->willReturn( false );
@@ -80,7 +80,7 @@ class SpamRegexConstraintTest extends MediaWikiUnitTestCase {
$spamChecker = $this->createMock( SpamChecker::class );
$spamChecker->expects( $this->once() )
->method( 'checkSummary' )
- ->with( $this->equalTo( $summary ) )
+ ->with( $summary )
->willReturn( $matchingText );
$prefixedDBKey = 'PrefixedDBKeyGoesHere';