-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathAdminBarRemovalUnitTest.php
More file actions
99 lines (89 loc) · 1.84 KB
/
AdminBarRemovalUnitTest.php
File metadata and controls
99 lines (89 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
/**
* Unit test class for WordPressVIPMinimum Coding Standard.
*
* @package VIPCS\WordPressVIPMinimum
*/
namespace WordPressVIPMinimum\Tests\UserExperience;
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
/**
* Unit test class for the AdminBarRemoval sniff.
*
* @covers \WordPressVIPMinimum\Sniffs\UserExperience\AdminBarRemovalSniff
*/
class AdminBarRemovalUnitTest extends AbstractSniffUnitTest {
/**
* Returns the lines where errors should occur.
*
* @param string $testFile The name of the file being tested.
*
* @return array<int, int> Key is the line number, value is the number of expected errors.
*/
public function getErrorList( $testFile = '' ) {
switch ( $testFile ) {
case 'AdminBarRemovalUnitTest.inc':
return [
3 => 1,
6 => 1,
9 => 1,
12 => 1,
13 => 1,
19 => 1,
20 => 1,
21 => 1,
26 => 1,
32 => 1,
56 => 1,
57 => 1,
58 => 1,
68 => 1,
69 => 1,
70 => 1,
81 => 1,
82 => 1,
83 => 1,
92 => 1,
103 => 1,
104 => 1,
105 => 1,
];
case 'AdminBarRemovalUnitTest.css':
return [
15 => 1,
16 => 1,
17 => 1,
22 => 1,
23 => 1,
24 => 1,
29 => 1,
30 => 1,
31 => 1,
38 => 1,
39 => 1,
40 => 1,
46 => 1,
47 => 1,
48 => 1,
];
default:
return [];
}
}
/**
* Returns the lines where warnings should occur.
*
* @param string $testFile The name of the file being tested.
*
* @return array<int, int> Key is the line number, value is the number of expected warnings.
*/
public function getWarningList( $testFile = '' ) {
switch ( $testFile ) {
case 'AdminBarRemovalUnitTest.css':
return [];
case 'AdminBarRemovalUnitTest.inc':
return [];
default:
return [];
}
}
}