Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4131435
PageStoreFactoryTest.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
PageStoreFactoryTest.php
View Options
<?php
namespace
MediaWiki\Tests\Page
;
use
MediaWiki\Cache\LinkCache
;
use
MediaWiki\Config\ServiceOptions
;
use
MediaWiki\MainConfigNames
;
use
MediaWiki\Page\PageStore
;
use
MediaWiki\Page\PageStoreFactory
;
use
MediaWiki\Title\NamespaceInfo
;
use
MediaWiki\Title\TitleParser
;
use
MediaWikiUnitTestCase
;
use
Wikimedia\Rdbms\LBFactory
;
use
Wikimedia\Rdbms\LoadBalancer
;
use
Wikimedia\Stats\StatsFactory
;
/**
* @covers \MediaWiki\Page\PageStoreFactory
*/
class
PageStoreFactoryTest
extends
MediaWikiUnitTestCase
{
public
function
testGetPageStore
()
{
$options
=
new
ServiceOptions
(
PageStoreFactory
::
CONSTRUCTOR_OPTIONS
,
[
MainConfigNames
::
LanguageCode
=>
'fi'
,
MainConfigNames
::
PageLanguageUseDB
=>
true
,
]
);
$lb
=
$this
->
createNoOpMock
(
LoadBalancer
::
class
);
$lbFactory
=
$this
->
createNoOpMock
(
LBFactory
::
class
,
[
'getMainLB'
]
);
$lbFactory
->
method
(
'getMainLB'
)->
willReturn
(
$lb
);
$factory
=
new
PageStoreFactory
(
$options
,
$lbFactory
,
$this
->
createNoOpMock
(
NamespaceInfo
::
class
),
$this
->
createNoOpMock
(
TitleParser
::
class
),
$this
->
createNoOpMock
(
LinkCache
::
class
),
$this
->
createNoOpMock
(
StatsFactory
::
class
)
);
// Just check that nothing explodes.
$this
->
assertInstanceOf
(
PageStore
::
class
,
$factory
->
getPageStore
()
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Aug 19, 10:57 (3 w, 8 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b3/1a/3d854ca0cbb73992e3cab99fb26e
Default Alt Text
PageStoreFactoryTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment