-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathGenericNamesUnitTest.php
57 lines (50 loc) · 1.24 KB
/
GenericNamesUnitTest.php
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
<?php
/**
* Unit tests for GenericNamesSniff.
*
* @package PluginCheck
*/
namespace PluginCheckCS\PluginCheck\Tests\CodeAnalysis;
use PluginCheckCS\PluginCheck\Sniffs\CodeAnalysis\GenericNamesSniff;
use PluginCheckCS\PluginCheck\Tests\AbstractSniffUnitTest;
use PHP_CodeSniffer\Sniffs\Sniff;
/**
* Unit tests for GenericNamesSniff.
*/
final class GenericNamesUnitTest extends AbstractSniffUnitTest {
/**
* Returns the lines where errors should occur.
*
* @return array <int line number> => <int number of errors>
*/
public function getErrorList() {
return array(
3 => 1,
);
}
/**
* Returns the lines where warnings should occur.
*
* @return array <int line number> => <int number of warnings>
*/
public function getWarningList() {
return array();
}
/**
* Returns the fully qualified class name (FQCN) of the sniff.
*
* @return string The fully qualified class name of the sniff.
*/
protected function get_sniff_fqcn() {
return GenericNamesSniff::class;
}
/**
* Sets the parameters for the sniff.
*
* @throws \RuntimeException If unable to set the ruleset parameters required for the test.
*
* @param Sniff $sniff The sniff being tested.
*/
public function set_sniff_parameters( Sniff $sniff ) {
}
}