Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4103624
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\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
(
MessageCache
::
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
Tue, Aug 18, 18:04 (3 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ca/c2/97d3081ed4f3f178729fef8414b2
Default Alt Text
FormatterFactoryTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment