dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Declare LogFormatter::$parsedParameters property
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
logging
/
LogFormatterTest.php
diff --git
a/tests/phpunit/includes/logging/LogFormatterTest.php
b/tests/phpunit/includes/logging/LogFormatterTest.php
index
1ef3df6
..
91ce9ea
100644
(file)
--- a/
tests/phpunit/includes/logging/LogFormatterTest.php
+++ b/
tests/phpunit/includes/logging/LogFormatterTest.php
@@
-53,8
+53,8
@@
class LogFormatterTest extends MediaWikiLangTestCase {
$this->setMwGlobals( [
'wgLogTypes' => [ 'phpunit' ],
$this->setMwGlobals( [
'wgLogTypes' => [ 'phpunit' ],
- 'wgLogActionsHandlers' => [ 'phpunit/test' =>
'LogFormatter'
,
- 'phpunit/param' =>
'LogFormatter'
],
+ 'wgLogActionsHandlers' => [ 'phpunit/test' =>
LogFormatter::class
,
+ 'phpunit/param' =>
LogFormatter::class
],
'wgUser' => User::newFromName( 'Testuser' ),
] );
'wgUser' => User::newFromName( 'Testuser' ),
] );
@@
-91,10
+91,11
@@
class LogFormatterTest extends MediaWikiLangTestCase {
$formatter->setShowUserToolLinks( false );
$paramsWithoutTools = $formatter->getMessageParametersForTesting();
$formatter->setShowUserToolLinks( false );
$paramsWithoutTools = $formatter->getMessageParametersForTesting();
- unset( $formatter->parsedParameters );
- $formatter->setShowUserToolLinks( true );
- $paramsWithTools = $formatter->getMessageParametersForTesting();
+ $formatter2 = LogFormatter::newFromEntry( $entry );
+ $formatter2->setContext( $this->context );
+ $formatter2->setShowUserToolLinks( true );
+ $paramsWithTools = $formatter2->getMessageParametersForTesting();
$userLink = Linker::userLink(
$this->user->getId(),
$userLink = Linker::userLink(
$this->user->getId(),
@@
-308,6
+309,10
@@
class LogFormatterTest extends MediaWikiLangTestCase {
'key_ns' => NS_PROJECT,
'key_title' => Title::newFromText( 'project:foo' )->getFullText(),
] ],
'key_ns' => NS_PROJECT,
'key_title' => Title::newFromText( 'project:foo' )->getFullText(),
] ],
+ [ '4:title-link:key', '<invalid>', [
+ 'key_ns' => NS_SPECIAL,
+ 'key_title' => SpecialPage::getTitleFor( 'Badtitle', '<invalid>' )->getFullText(),
+ ] ],
[ '4:user:key', 'foo', [ 'key' => 'Foo' ] ],
[ '4:user-link:key', 'foo', [ 'key' => 'Foo' ] ],
];
[ '4:user:key', 'foo', [ 'key' => 'Foo' ] ],
[ '4:user-link:key', 'foo', [ 'key' => 'Foo' ] ],
];