Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7464023
FormatterFactoryTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
FormatterFactoryTest.php
View Options
<?php
use
MediaWiki\Context\IContextSource
;
use
MediaWiki\HookContainer\HookContainer
;
use
MediaWiki\Language\FormatterFactory
;
use
MediaWiki\Language\MessageParser
;
use
MediaWiki\Languages\LanguageFactory
;
use
MediaWiki\Title\TitleFormatter
;
use
MediaWiki\User\UserIdentityUtils
;
use
Psr\Log\NullLogger
;
/**
* @covers \MediaWiki\Language\FormatterFactory
*/
class
FormatterFactoryTest
extends
MediaWikiUnitTestCase
{
private
function
getFactory
()
{
return
new
FormatterFactory
(
$this
->
createNoOpMock
(
MessageParser
::
class
),
$this
->
createNoOpMock
(
TitleFormatter
::
class
),
$this
->
createNoOpMock
(
HookContainer
::
class
),
$this
->
createNoOpMock
(
UserIdentityUtils
::
class
),
$this
->
createNoOpMock
(
LanguageFactory
::
class
),
new
NullLogger
()
);
}
public
function
testGetStatusFormatter
()
{
$factory
=
$this
->
getFactory
();
$factory
->
getStatusFormatter
(
$this
->
createNoOpMock
(
MessageLocalizer
::
class
)
);
// Just make sure the getter works.
// This protects against constructor signature changes.
$this
->
addToAssertionCount
(
1
);
}
public
function
testGetBlockErrorFormatter
()
{
$factory
=
$this
->
getFactory
();
$factory
->
getBlockErrorFormatter
(
$this
->
createNoOpMock
(
IContextSource
::
class
)
);
// Just make sure the getter works.
// This protects against constructor signature changes.
$this
->
addToAssertionCount
(
1
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 23, 04:23 (3 d, 23 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
63/ba/b9e39bd40524e031f0c9fbd8a942
Default Alt Text
FormatterFactoryTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment