Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4142823
RevertedTagUpdateManagerTest.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
RevertedTagUpdateManagerTest.php
View Options
<?php
namespace
MediaWiki\Tests\Storage
;
use
JobQueueGroup
;
use
MediaWiki\Storage\EditResult
;
use
MediaWiki\Storage\EditResultCache
;
use
MediaWiki\Storage\RevertedTagUpdateManager
;
use
MediaWikiUnitTestCase
;
/**
* @covers \MediaWiki\Storage\RevertedTagUpdateManager
*
* @see RevertedTagUpdateIntegrationTest for integration tests
*/
class
RevertedTagUpdateManagerTest
extends
MediaWikiUnitTestCase
{
public
function
testApproveRevertedTagForRevision
()
{
$revisionId
=
123
;
$editResult
=
$this
->
createMock
(
EditResult
::
class
);
$editResultCache
=
$this
->
createMock
(
EditResultCache
::
class
);
$editResultCache
->
expects
(
$this
->
once
()
)
->
method
(
'get'
)
->
with
(
$revisionId
)
->
willReturn
(
$editResult
);
$jobQueueGroup
=
$this
->
createMock
(
JobQueueGroup
::
class
);
$jobQueueGroup
->
expects
(
$this
->
once
()
)
->
method
(
'lazyPush'
);
$manager
=
new
RevertedTagUpdateManager
(
$editResultCache
,
$jobQueueGroup
);
$this
->
assertTrue
(
$manager
->
approveRevertedTagForRevision
(
$revisionId
),
'The operation is successful'
);
}
public
function
testApproveRevertedTagForRevision_missingEditResult
()
{
$revisionId
=
123
;
$editResultCache
=
$this
->
createMock
(
EditResultCache
::
class
);
$editResultCache
->
expects
(
$this
->
once
()
)
->
method
(
'get'
)
->
with
(
$revisionId
)
->
willReturn
(
null
);
$jobQueueGroup
=
$this
->
createNoOpMock
(
JobQueueGroup
::
class
);
$manager
=
new
RevertedTagUpdateManager
(
$editResultCache
,
$jobQueueGroup
);
$this
->
assertFalse
(
$manager
->
approveRevertedTagForRevision
(
$revisionId
),
'The operation is not successful'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 19 2026, 16:32 (4 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9d/36/9c772a6d3524c1541e58d53b3a24
Default Alt Text
RevertedTagUpdateManagerTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment