@@ 14-23 (lines=10) @@ | ||
11 | final class CodeStyleTest extends TestCase |
|
12 | { |
|
13 | ||
14 | public function testConvertToTabs() |
|
15 | { |
|
16 | $file = sys_get_temp_dir() . '/doctrine-migrations/some-spaced-text-file.txt'; |
|
17 | @mkdir(dirname($file)); |
|
18 | file_put_contents($file, ' hi'); |
|
19 | (new CodeStyle(CodeStyle::INDENTATION_TABS))->applyForFile($file); |
|
20 | ||
21 | $this->assertStringNotEqualsFile($file, ' hi'); |
|
22 | $this->assertStringEqualsFile($file, "\thi"); |
|
23 | } |
|
24 | ||
25 | ||
26 | public function testKeepSpaces() |
|
@@ 26-35 (lines=10) @@ | ||
23 | } |
|
24 | ||
25 | ||
26 | public function testKeepSpaces() |
|
27 | { |
|
28 | $file = sys_get_temp_dir() . '/doctrine-migrations/some-spaced-text-file.txt'; |
|
29 | @mkdir(dirname($file)); |
|
30 | file_put_contents($file, ' hi'); |
|
31 | (new CodeStyle(CodeStyle::INDENTATION_SPACES))->applyForFile($file); |
|
32 | ||
33 | $this->assertStringEqualsFile($file, ' hi'); |
|
34 | $this->assertStringNotEqualsFile($file, "\thi"); |
|
35 | } |
|
36 | ||
37 | } |
|
38 |