PhpSyntaxCheckReviewTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 34
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getPhpFileSyntaxDataProvider() 0 17 1
A testPhpFileSyntax() 0 3 1
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