Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4101044
MathTest.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
MathTest.php
View Options
<?php
namespace
MediaWiki\Extension\Math\Tests
;
use
MediaWiki\Config\HashConfig
;
use
MediaWiki\Config\ServiceOptions
;
use
MediaWiki\Extension\Math\Math
;
use
MediaWiki\Extension\Math\MathConfig
;
use
MediaWiki\MediaWikiServices
;
use
MediaWiki\Registration\ExtensionRegistry
;
use
MediaWikiUnitTestCase
;
/**
* @covers \MediaWiki\Extension\Math\Math
*/
class
MathTest
extends
MediaWikiUnitTestCase
{
private
const
DUMMY_URL
=
'https://example.com/api.php'
;
public
function
testGetMathConfigService
()
{
$config
=
new
HashConfig
(
[
'MathDisableTexFilter'
=>
MathConfig
::
NEW
,
'MathValidModes'
=>
[
MathConfig
::
MODE_SOURCE
],
'MathEntitySelectorFallbackUrl'
=>
self
::
DUMMY_URL
,
]
);
$services
=
new
MediaWikiServices
(
$config
);
$services
->
defineService
(
'Math.Config'
,
function
(
MediaWikiServices
$services
)
use
(
$config
)
{
return
new
MathConfig
(
new
ServiceOptions
(
MathConfig
::
CONSTRUCTOR_OPTIONS
,
$config
),
$this
->
createMock
(
ExtensionRegistry
::
class
)
);
}
);
$mathConfig
=
Math
::
getMathConfig
(
$services
);
$this
->
assertStringContainsString
(
'new'
,
$mathConfig
->
texCheckDisabled
()
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Aug 18, 16:46 (3 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
45/c5/d47d3c332ddbb1ee0a8b15374b46
Default Alt Text
MathTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment