Completed
Branch feature/scrutinizer-run-tests (072b5a)
by Juliette
10:12
created

DoesFunctionCallHaveParametersTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 1
cbo 2
dl 0
loc 41
rs 10
1
<?php
2
/**
3
 * Function parameters test file
4
 *
5
 * @package PHPCompatibility
6
 */
7
8
9
/**
10
 * Function parameters function tests
11
 *
12
 * @uses BaseSniffTest
13
 * @package PHPCompatibility
14
 */
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