diff options
author | SomeRandomDeveloper <thisisnotmyname275@gmail.com> | 2025-01-23 22:30:04 +0100 |
---|---|---|
committer | SomeRandomDeveloper <thisisnotmyname275@gmail.com> | 2025-02-21 00:32:47 +0000 |
commit | 4d237035f3f2d187108748448c286681203627d2 (patch) | |
tree | 9908905104e77c7bd8fdde9f7dc72ce1bedd5342 /tests/phpunit/unit/includes/editpage | |
parent | a603da0381f028b30d8f4e3cf574d2c3a9e99681 (diff) | |
download | mediawikicore-4d237035f3f2d187108748448c286681203627d2.tar.gz mediawikicore-4d237035f3f2d187108748448c286681203627d2.zip |
editpage: Make BrokenRedirectConstraint provide its own error message
Generate the error message in the getLegacyStatus function in the constraint
class instead of EditPage. The submit button label has to be passed to the edit
constraint since the logic for determining it it resides in EditPage.
Bug: T384399
Change-Id: Id2a9ab57198dfa4df07f91b067944e9f9fefb81a
Diffstat (limited to 'tests/phpunit/unit/includes/editpage')
-rw-r--r-- | tests/phpunit/unit/includes/editpage/Constraint/BrokenRedirectConstraintTest.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/phpunit/unit/includes/editpage/Constraint/BrokenRedirectConstraintTest.php b/tests/phpunit/unit/includes/editpage/Constraint/BrokenRedirectConstraintTest.php index 15fbd4fb4e4a..0e1ccfa96fb6 100644 --- a/tests/phpunit/unit/includes/editpage/Constraint/BrokenRedirectConstraintTest.php +++ b/tests/phpunit/unit/includes/editpage/Constraint/BrokenRedirectConstraintTest.php @@ -55,7 +55,8 @@ class BrokenRedirectConstraintTest extends MediaWikiUnitTestCase { false, // $allowBrokenRedirects $this->getContent( true ), $this->getContent( true ), - $title + $title, + '' ); $this->assertConstraintPassed( $constraint ); } @@ -67,7 +68,8 @@ class BrokenRedirectConstraintTest extends MediaWikiUnitTestCase { false, // $allowBrokenRedirects $this->getContent( true ), $this->getContent( false ), - $title + $title, + '' ); $this->assertConstraintFailed( $constraint, |