PhpFileStartLineReviewTest::testTestFileStart()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
  namespace Funivan\Cs\Tools\Php\FileStartLine\Tests;
4
5
  use Funivan\Cs\Tools\Php\FileStartLine\FileStartLineReview;
6
7
  /**
8
   *
9
   */
10
  class PhpFileStartLineReviewTest extends \Tests\Funivan\Cs\BaseTestCase {
11
12
    /**
13
     * @return array
14
     */
15
    public function getTestFileStartDataProvider() {
16
      return [
17
        [
18
          '<?php echo 1',
19
20
          [],
21
        ],
22
        [
23
          '
24
          
25
          <?php echo 1',
26
27
          [1],
28
        ],
29
        [
30
          '#!/usr/bin/env php',
31
          [],
32
        ],
33
        [
34
          '#!/usr/bin/php',
35
          [1],
36
        ],
37
      ];
38
    }
39
40
41
    /**
42
     * @dataProvider getTestFileStartDataProvider
43
     * @param string $input
44
     * @param array $expectErrorLines
45
     */
46
    public function testTestFileStart($input, array $expectErrorLines) {
47
      static::assertReview(new FileStartLineReview(), $input, $expectErrorLines);
48
    }
49
50
  }
51