Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4111861
PatrolLogFormatterTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
PatrolLogFormatterTest.php
View Options
<?php
/**
* @covers \PatrolLogFormatter
*/
class
PatrolLogFormatterTest
extends
LogFormatterTestCase
{
/**
* Provide different rows from the logging table to test
* for backward compatibility.
* Do not change the existing data, just add a new database row
*/
public
static
function
providePatrolLogDatabaseRows
()
{
return
[
// Current format
[
[
'type'
=>
'patrol'
,
'action'
=>
'patrol'
,
'comment'
=>
'patrol comment'
,
'namespace'
=>
NS_MAIN
,
'title'
=>
'Page'
,
'params'
=>
[
'4::curid'
=>
2
,
'5::previd'
=>
1
,
'6::auto'
=>
0
,
],
],
[
'text'
=>
'User marked revision 2 of page Page patrolled'
,
'api'
=>
[
'curid'
=>
2
,
'previd'
=>
1
,
'auto'
=>
false
,
],
],
],
// Current format - autopatrol
[
[
'type'
=>
'patrol'
,
'action'
=>
'patrol'
,
'comment'
=>
'patrol comment'
,
'namespace'
=>
NS_MAIN
,
'title'
=>
'Page'
,
'params'
=>
[
'4::curid'
=>
2
,
'5::previd'
=>
1
,
'6::auto'
=>
1
,
],
],
[
'text'
=>
'User automatically marked revision 2 of page Page patrolled'
,
'api'
=>
[
'curid'
=>
2
,
'previd'
=>
1
,
'auto'
=>
true
,
],
],
],
// Legacy format
[
[
'type'
=>
'patrol'
,
'action'
=>
'patrol'
,
'comment'
=>
'patrol comment'
,
'namespace'
=>
NS_MAIN
,
'title'
=>
'Page'
,
'params'
=>
[
'2'
,
'1'
,
'0'
,
],
],
[
'legacy'
=>
true
,
'text'
=>
'User marked revision 2 of page Page patrolled'
,
'api'
=>
[
'curid'
=>
2
,
'previd'
=>
1
,
'auto'
=>
false
,
],
],
],
// Legacy format - autopatrol
[
[
'type'
=>
'patrol'
,
'action'
=>
'patrol'
,
'comment'
=>
'patrol comment'
,
'namespace'
=>
NS_MAIN
,
'title'
=>
'Page'
,
'params'
=>
[
'2'
,
'1'
,
'1'
,
],
],
[
'legacy'
=>
true
,
'text'
=>
'User automatically marked revision 2 of page Page patrolled'
,
'api'
=>
[
'curid'
=>
2
,
'previd'
=>
1
,
'auto'
=>
true
,
],
],
],
];
}
/**
* @dataProvider providePatrolLogDatabaseRows
*/
public
function
testPatrolLogDatabaseRows
(
$row
,
$extra
)
{
$this
->
doTestLogFormatter
(
$row
,
$extra
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Aug 18, 22:34 (1 d, 3 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
23/41/3890b7b411131e8a02cd0964e1ab
Default Alt Text
PatrolLogFormatterTest.php (2 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment