PhpFileStartLineReviewTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
B getTestFileStartDataProvider() 0 24 1
A testTestFileStart() 0 3 1
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