diff options
author | Cindy Cicalese <cindom@gmail.com> | 2021-03-24 23:08:22 -0400 |
---|---|---|
committer | Cindy Cicalese <cindom@gmail.com> | 2021-03-26 15:51:19 -0400 |
commit | a78184782fb7d2026cdf46686a37cb9bf8c0c818 (patch) | |
tree | 246f50dc9df91e9c7f190d0404b55aa012b639d4 /tests/phpunit/mocks/MockTitleTrait.php | |
parent | 0949c7ac20304e1078ea5bcaa7c2c114aea5ab62 (diff) | |
download | mediawikicore-a78184782fb7d2026cdf46686a37cb9bf8c0c818.tar.gz mediawikicore-a78184782fb7d2026cdf46686a37cb9bf8c0c818.zip |
Convert WatchedItem et al to PageIdentity
Change-Id: Iddcd109b7f78efdbcb0e4016e81fd2c8d4666b46
Diffstat (limited to 'tests/phpunit/mocks/MockTitleTrait.php')
-rw-r--r-- | tests/phpunit/mocks/MockTitleTrait.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/phpunit/mocks/MockTitleTrait.php b/tests/phpunit/mocks/MockTitleTrait.php index c7f8a946e248..9668fd296550 100644 --- a/tests/phpunit/mocks/MockTitleTrait.php +++ b/tests/phpunit/mocks/MockTitleTrait.php @@ -70,7 +70,8 @@ trait MockTitleTrait { return $other && $text === $other->getDBkey() && $ns === $other->getNamespace(); } ); $title->method( 'equals' )->willReturnCallback( static function ( $other ) use ( $preText ) { - return $other->getPrefixedDBkey() === str_replace( ' ', '_', $preText ); + return $other->getNamespace() ? 'ns' . $other->getNamespace() . ':' : '' . $other->getDBkey() === + str_replace( ' ', '_', $preText ); } ); $title->method( '__toString' )->willReturn( "MockTitle:{$preText}" ); |