Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4126033
MobileFrontendSkinHooksTest.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
MobileFrontendSkinHooksTest.php
View Options
<?php
use
MediaWiki\Message\Message
;
/**
* @group MobileFrontend
* @coversDefaultClass \MobileFrontendSkinHooks
*/
class
MobileFrontendSkinHooksTest
extends
MediaWikiLangTestCase
{
/**
* @covers ::getTermsLink
* @dataProvider provideGetTermsLinkData
*/
public
function
testGetTermsLink
(
$isDisabled
,
$expected
)
{
$messageMock
=
$this
->
createMock
(
Message
::
class
);
$messageMock
->
method
(
'inContentLanguage'
)
->
willReturnSelf
();
$messageMock
->
method
(
'isDisabled'
)
->
willReturn
(
$isDisabled
);
$messageMock
->
method
(
'plain'
)
->
willReturn
(
'https://wiki.mobilefrontend.mf'
);
$messageMock
->
method
(
'text'
)
->
willReturn
(
'Text should escape <'
);
$messageLocalizerMock
=
$this
->
createMock
(
MessageLocalizer
::
class
);
$messageLocalizerMock
->
method
(
'msg'
)
->
willReturn
(
$messageMock
);
$actual
=
MobileFrontendSkinHooks
::
getTermsLink
(
$messageLocalizerMock
);
$this
->
assertSame
(
$expected
,
$actual
);
}
public
static
function
provideGetTermsLinkData
()
{
return
[
[
true
,
null
],
[
false
,
'<a href="https://wiki.mobilefrontend.mf">Text should escape <</a>'
]
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Aug 19, 07:52 (2 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
1f/cb/f3dd190b07a346fdd403dd1b8771
Default Alt Text
MobileFrontendSkinHooksTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment