Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F2753777
IPContributionsPagerFactoryTest.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
IPContributionsPagerFactoryTest.php
View Options
<?php
namespace
MediaWiki\CheckUser\Tests\Integration\IPContributions
;
use
InvalidArgumentException
;
use
MediaWiki\CheckUser\IPContributions\IPContributionsPager
;
use
MediaWiki\Context\RequestContext
;
use
MediaWiki\User\UserIdentityValue
;
use
MediaWikiIntegrationTestCase
;
/**
* @covers \MediaWiki\CheckUser\IPContributions\IPContributionsPagerFactory
* @group CheckUser
* @group Database
*/
class
IPContributionsPagerFactoryTest
extends
MediaWikiIntegrationTestCase
{
public
function
testCreatePager
()
{
// Tests that the factory creates an IPContributionsPager instance and does not throw an exception.
$this
->
assertInstanceOf
(
IPContributionsPager
::
class
,
$this
->
getServiceContainer
()->
get
(
'CheckUserIPContributionsPagerFactory'
)
->
createPager
(
RequestContext
::
getMain
(),
[],
new
UserIdentityValue
(
0
,
'127.0.0.1'
)
),
'CheckUserIPContributionsPagerFactory::createPager should create an IPContributionsPager instance'
);
}
public
function
testCreatePagerInvalidTarget
()
{
$this
->
expectException
(
InvalidArgumentException
::
class
);
$this
->
getServiceContainer
()->
get
(
'CheckUserIPContributionsPagerFactory'
)
->
createPager
(
RequestContext
::
getMain
(),
[],
$this
->
getTestUser
()->
getUser
()
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Jul 3, 21:43 (17 h, 40 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
25/2d/6dab66105edcd2f2e87df54a3b4d
Default Alt Text
IPContributionsPagerFactoryTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment