1 | <?php |
||
15 | class DoesFunctionCallHaveParametersTest extends BaseAbstractClassMethodTest |
||
16 | { |
||
17 | |||
18 | public $filename = 'sniff-examples/utility-functions/does_function_call_have_parameters.php'; |
||
19 | |||
20 | /** |
||
21 | * testDoesFunctionCallHaveParameters |
||
22 | * |
||
23 | * @group utilityFunctions |
||
24 | * |
||
25 | * @dataProvider dataDoesFunctionCallHaveParameters |
||
26 | * |
||
27 | * @param int $stackPtr Stack pointer for a T_CLASS token in the test file. |
||
28 | * @param string $expected The expected fully qualified class name. |
||
29 | */ |
||
30 | public function testDoesFunctionCallHaveParameters($stackPtr, $expected) { |
||
31 | $result = $this->helperClass->doesFunctionCallHaveParameters($this->_phpcsFile, $stackPtr); |
||
32 | $this->assertSame($expected, $result); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * dataDoesFunctionCallHaveParameters |
||
37 | * |
||
38 | * @see testDoesFunctionCallHaveParameters() |
||
39 | * |
||
40 | * @return array |
||
41 | */ |
||
42 | public function dataDoesFunctionCallHaveParameters() |
||
43 | { |
||
44 | return array( |
||
45 | array(12, false), |
||
46 | array(17, false), |
||
47 | array(23, false), |
||
48 | array(31, false), |
||
49 | array(42, true), |
||
50 | array(50, true), |
||
51 | array(60, true), |
||
52 | ); |
||
53 | } |
||
54 | |||
55 | } |
||
56 |