getPhpFileSyntaxDataProvider()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 17
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
  namespace Funivan\Cs\Tools\Php\SyntaxCheck\Tests;
4
5
  use Funivan\Cs\Tools\Php\SyntaxCheck\SyntaxCheckReview;
6
  use Tests\Funivan\Cs\BaseTestCase;
7
8
  /**
9
   *
10
   */
11
  class PhpSyntaxCheckReviewTest extends BaseTestCase {
12
13
    /**
14
     * @return array
15
     */
16
    public function getPhpFileSyntaxDataProvider() {
17
      return [
18
        [
19
          "<?php echo 1;",
20
          [],
21
        ],
22
        [
23
          "<?php decho 1;",
24
          [1],
25
        ],
26
        [
27
          "<?php 
28
          decho 1;",
29
          [2],
30
        ],
31
      ];
32
    }
33
34
35
    /**
36
     * @dataProvider getPhpFileSyntaxDataProvider
37
     * @param string $input
38
     * @param array $expectErrorLines
39
     */
40
    public function testPhpFileSyntax($input, array $expectErrorLines) {
41
      static::assertReview(new SyntaxCheckReview(), $input, $expectErrorLines);
42
    }
43
44
  }
45