Completed
Push — master ( f20c64...aa6f68 )
by Shcherbak
02:23
created

LineAfterOpenTagFixerTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
  namespace Funivan\Cs\Tools\Php\LineAfterOpenTag\Tests;
4
5
  use Funivan\Cs\Tools\Php\LineAfterOpenTag\LineAfterOpenTagFixer;
6
  use Tests\Funivan\Cs\FixerTestCase;
7
8
  /**
9
   *
10
   */
11
  class LineAfterOpenTagFixerTest extends FixerTestCase {
12
13
    protected function setUp() {
14
      ini_set('short_open_tag', true);
15
      parent::setUp();
16
    }
17
18
19
    /**
20
     * @return array
21
     */
22
    public function getSetEmptyLineDataProvider() {
23
      return [
24
        [
25
          '<?php
26
27
28
echo 1;',
29
          '<?php
30
31
echo 1;',
32
33
        ],
34
        [
35
          '<? echo 1;',
36
          '<?
37
38
 echo 1;',
39
        ],
40
        [
41
          '<?php echo 1;',
42
          '<?php 
43
44
echo 1;',
45
        ],
46
        [
47
          '<?php
48
        echo 1;',
49
          '<?php
50
51
        echo 1;',
52
        ],
53
      ];
54
    }
55
56
57
    /**
58
     * @dataProvider getSetEmptyLineDataProvider
59
     * @param string $input
60
     * @param string $expect
61
     */
62
    public function testSetEmptyLine($input, $expect) {
63
      $this->process(new LineAfterOpenTagFixer(), $input, $expect);
64
    }
65
66
  }
67