From 4d237035f3f2d187108748448c286681203627d2 Mon Sep 17 00:00:00 2001 From: SomeRandomDeveloper Date: Thu, 23 Jan 2025 22:30:04 +0100 Subject: 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 --- .../includes/editpage/Constraint/BrokenRedirectConstraintTest.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/phpunit/unit/includes/editpage') 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, -- cgit v1.2.3