Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7434070
PushNotifierTest.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
PushNotifierTest.php
View Options
<?php
namespace
MediaWiki\Extension\Notifications\Test\Integration\Push
;
use
MediaWiki\Extension\Notifications\Push\NotificationRequestJob
;
use
MediaWiki\Extension\Notifications\Push\PushNotifier
;
use
MediaWiki\User\CentralId\CentralIdLookup
;
use
MediaWiki\User\User
;
use
MediaWikiIntegrationTestCase
;
use
Wikimedia\TestingAccessWrapper
;
/** @covers \MediaWiki\Extension\Notifications\Push\PushNotifier */
class
PushNotifierTest
extends
MediaWikiIntegrationTestCase
{
public
function
testCreateJob
():
void
{
$user
=
$this
->
createMock
(
User
::
class
);
$centralId
=
42
;
$centralIdLookup
=
$this
->
createMock
(
CentralIdLookup
::
class
);
$centralIdLookup
->
method
(
'centralIdFromLocalUser'
)
->
with
(
$user
)
->
willReturn
(
42
);
$this
->
setService
(
'CentralIdLookup'
,
$centralIdLookup
);
$notifier
=
TestingAccessWrapper
::
newFromClass
(
PushNotifier
::
class
);
$job
=
$notifier
->
createJob
(
$user
);
$this
->
assertInstanceOf
(
NotificationRequestJob
::
class
,
$job
);
$this
->
assertSame
(
'EchoPushNotificationRequest'
,
$job
->
getType
()
);
$this
->
assertSame
(
$centralId
,
$job
->
getParams
()[
'centralId'
]
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 12:14 (1 d, 12 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
4c/d9/6b95ae9f0f7445785e22b0f33a3e
Default Alt Text
PushNotifierTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment