Completed
Push — master ( bfc368...43106f )
by Shcherbak
02:26
created

getLineAfterOpenTagDataProvider()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 29
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 29
rs 8.8571
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
  namespace Funivan\Cs\Tools\Php\LineAfterOpenTag\Tests;
4
5
  use Funivan\Cs\Tools\Php\LineAfterOpenTag\LineAfterOpenTagReview;
6
  use Tests\Funivan\Cs\ReviewTestCase;
7
8
  /**
9
   *
10
   */
11
  class LineAfterOpenTagReviewTest extends ReviewTestCase {
12
13
    /**
14
     * @return array
15
     */
16
    public function getLineAfterOpenTagDataProvider() {
17
      return [
18
        [
19
          '<?php
20
21
22
23
',
24
          [1],
25
        ],
26
        [
27
          '<?php
28
29
echo 1;
30
',
31
          [],
32
        ],
33
        [
34
          '<?php
35
36
echo 1;?>
37
<?
38
39
40
',
41
          [4],
42
        ],
43
      ];
44
    }
45
46
47
    /**
48
     * @dataProvider getLineAfterOpenTagDataProvider
49
     * @param string $input
50
     * @param array $errorLines
51
     */
52
    public function testLineAfterOpenTag($input, array $errorLines) {
53
54
      $tool = new LineAfterOpenTagReview();
55
      $report = $this->process($tool, $input);
56
      $this->assertInvalidLinesInReport($report, $errorLines);
57
    }
58
59
60
  }
61