Completed
Push — master ( af28eb...bd6b4d )
by Shcherbak
03:04
created

getLineBeforeClassEndDataProvider()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 37
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

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