Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7431875
MobileConfigTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
965 B
Referenced Files
None
Subscribers
None
MobileConfigTest.php
View Options
<?php
use
MediaWiki\Request\FauxRequest
;
use
MediaWiki\ResourceLoader\Context
;
use
MediaWiki\ResourceLoader\ResourceLoader
;
use
MobileFrontend\ResourceLoaderModules\MobileConfig
;
use
Psr\Log\NullLogger
;
/**
* @group MobileFrontend
* @covers \MobileFrontend\ResourceLoaderModules\MobileConfig
*/
class
MobileConfigTest
extends
MediaWikiIntegrationTestCase
{
/** @return Context */
private
function
createContext
():
Context
{
$rl
=
$this
->
createNoOpMock
(
ResourceLoader
::
class
,
[
'getLogger'
]
);
$rl
->
method
(
'getLogger'
)->
willReturn
(
new
NullLogger
()
);
return
new
Context
(
$rl
,
new
FauxRequest
(
[]
)
);
}
public
function
testMakeScript
()
{
$script
=
MobileConfig
::
makeScript
(
$this
->
createContext
()
);
$this
->
assertIsString
(
$script
);
$this
->
assertStringContainsString
(
'mw.config.set'
,
$script
);
// Assert that we have some configs in the string. "wg" is a good indicator.
$this
->
assertStringContainsString
(
'wg'
,
$script
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 11:09 (6 h, 25 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
2a/7d/20f4261e5139376b77ddcdafc584
Default Alt Text
MobileConfigTest.php (965 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment