| 1 | <?php |
||
| 15 | class BaseClass_DoesFunctionCallHaveParametersTest extends BaseClass_MethodTestFrame |
||
| 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 | * @covers PHPCompatibility_Sniff::doesFunctionCallHaveParameters |
||
| 28 | * |
||
| 29 | * @param int $stackPtr Stack pointer for a T_CLASS token in the test file. |
||
| 30 | * @param string $expected The expected fully qualified class name. |
||
| 31 | */ |
||
| 32 | public function testDoesFunctionCallHaveParameters($stackPtr, $expected) { |
||
| 33 | $result = $this->helperClass->doesFunctionCallHaveParameters($this->_phpcsFile, $stackPtr); |
||
| 34 | $this->assertSame($expected, $result); |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * dataDoesFunctionCallHaveParameters |
||
| 39 | * |
||
| 40 | * @see testDoesFunctionCallHaveParameters() |
||
| 41 | * |
||
| 42 | * @return array |
||
| 43 | */ |
||
| 44 | public function dataDoesFunctionCallHaveParameters() |
||
| 45 | { |
||
| 46 | return array( |
||
| 47 | array(12, false), |
||
| 48 | array(17, false), |
||
| 49 | array(23, false), |
||
| 50 | array(31, false), |
||
| 51 | array(42, true), |
||
| 52 | array(50, true), |
||
| 53 | array(60, true), |
||
| 54 | ); |
||
| 55 | } |
||
| 56 | |||
| 57 | } |
||
| 58 |