dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add @covers tags to logging tests
[lhc/web/wiklou.git]
/
tests
/
phpunit
/
includes
/
logging
/
PatrolLogFormatterTest.php
diff --git
a/tests/phpunit/includes/logging/PatrolLogFormatterTest.php
b/tests/phpunit/includes/logging/PatrolLogFormatterTest.php
index
6e1c5ef
..
0d78ed9
100644
(file)
--- a/
tests/phpunit/includes/logging/PatrolLogFormatterTest.php
+++ b/
tests/phpunit/includes/logging/PatrolLogFormatterTest.php
@@
-1,5
+1,8
@@
<?php
<?php
+/**
+ * @covers PatrolLogFormatter
+ */
class PatrolLogFormatterTest extends LogFormatterTestCase {
/**
class PatrolLogFormatterTest extends LogFormatterTestCase {
/**
@@
-8,105
+11,105
@@
class PatrolLogFormatterTest extends LogFormatterTestCase {
* Do not change the existing data, just add a new database row
*/
public static function providePatrolLogDatabaseRows() {
* Do not change the existing data, just add a new database row
*/
public static function providePatrolLogDatabaseRows() {
- return
array(
+ return
[
// Current format
// Current format
- array(
- array(
+ [
+ [
'type' => 'patrol',
'action' => 'patrol',
'comment' => 'patrol comment',
'namespace' => NS_MAIN,
'title' => 'Page',
'type' => 'patrol',
'action' => 'patrol',
'comment' => 'patrol comment',
'namespace' => NS_MAIN,
'title' => 'Page',
- 'params' =>
array(
+ 'params' =>
[
'4::curid' => 2,
'5::previd' => 1,
'6::auto' => 0,
'4::curid' => 2,
'5::previd' => 1,
'6::auto' => 0,
-
)
,
-
)
,
- array(
+
]
,
+
]
,
+ [
'text' => 'User marked revision 2 of page Page patrolled',
'text' => 'User marked revision 2 of page Page patrolled',
- 'api' =>
array(
+ 'api' =>
[
'curid' => 2,
'previd' => 1,
'auto' => false,
'curid' => 2,
'previd' => 1,
'auto' => false,
-
)
,
-
)
,
-
)
,
+
]
,
+
]
,
+
]
,
// Current format - autopatrol
// Current format - autopatrol
- array(
- array(
+ [
+ [
'type' => 'patrol',
'action' => 'patrol',
'comment' => 'patrol comment',
'namespace' => NS_MAIN,
'title' => 'Page',
'type' => 'patrol',
'action' => 'patrol',
'comment' => 'patrol comment',
'namespace' => NS_MAIN,
'title' => 'Page',
- 'params' =>
array(
+ 'params' =>
[
'4::curid' => 2,
'5::previd' => 1,
'6::auto' => 1,
'4::curid' => 2,
'5::previd' => 1,
'6::auto' => 1,
-
)
,
-
)
,
- array(
+
]
,
+
]
,
+ [
'text' => 'User automatically marked revision 2 of page Page patrolled',
'text' => 'User automatically marked revision 2 of page Page patrolled',
- 'api' =>
array(
+ 'api' =>
[
'curid' => 2,
'previd' => 1,
'auto' => true,
'curid' => 2,
'previd' => 1,
'auto' => true,
-
)
,
-
)
,
-
)
,
+
]
,
+
]
,
+
]
,
// Legacy format
// Legacy format
- array(
- array(
+ [
+ [
'type' => 'patrol',
'action' => 'patrol',
'comment' => 'patrol comment',
'namespace' => NS_MAIN,
'title' => 'Page',
'type' => 'patrol',
'action' => 'patrol',
'comment' => 'patrol comment',
'namespace' => NS_MAIN,
'title' => 'Page',
- 'params' =>
array(
+ 'params' =>
[
'2',
'1',
'0',
'2',
'1',
'0',
-
)
,
-
)
,
- array(
+
]
,
+
]
,
+ [
'legacy' => true,
'text' => 'User marked revision 2 of page Page patrolled',
'legacy' => true,
'text' => 'User marked revision 2 of page Page patrolled',
- 'api' =>
array(
+ 'api' =>
[
'curid' => 2,
'previd' => 1,
'auto' => false,
'curid' => 2,
'previd' => 1,
'auto' => false,
-
)
,
-
)
,
-
)
,
+
]
,
+
]
,
+
]
,
// Legacy format - autopatrol
// Legacy format - autopatrol
- array(
- array(
+ [
+ [
'type' => 'patrol',
'action' => 'patrol',
'comment' => 'patrol comment',
'namespace' => NS_MAIN,
'title' => 'Page',
'type' => 'patrol',
'action' => 'patrol',
'comment' => 'patrol comment',
'namespace' => NS_MAIN,
'title' => 'Page',
- 'params' =>
array(
+ 'params' =>
[
'2',
'1',
'1',
'2',
'1',
'1',
-
)
,
-
)
,
- array(
+
]
,
+
]
,
+ [
'legacy' => true,
'text' => 'User automatically marked revision 2 of page Page patrolled',
'legacy' => true,
'text' => 'User automatically marked revision 2 of page Page patrolled',
- 'api' =>
array(
+ 'api' =>
[
'curid' => 2,
'previd' => 1,
'auto' => true,
'curid' => 2,
'previd' => 1,
'auto' => true,
-
)
,
-
)
,
-
)
,
-
)
;
+
]
,
+
]
,
+
]
,
+
]
;
}
/**
}
/**