@@ -6,7 +6,6 @@ |
||
6 | 6 | * @package BrianHenryIE\Strauss\Tests\Integration |
7 | 7 | * @coversNothing |
8 | 8 | */ |
9 | -class CleanupIntegrationTest |
|
10 | -{ |
|
9 | +class CleanupIntegrationTest { |
|
11 | 10 | |
12 | 11 | } |
@@ -19,10 +19,10 @@ discard block |
||
19 | 19 | class FileEnumeratorIntegrationTest extends IntegrationTestCase |
20 | 20 | { |
21 | 21 | |
22 | - public function testBuildFileList() |
|
23 | - { |
|
22 | + public function testBuildFileList() |
|
23 | + { |
|
24 | 24 | |
25 | - $composerJsonString = <<<'EOD' |
|
25 | + $composerJsonString = <<<'EOD' |
|
26 | 26 | { |
27 | 27 | "name": "brianhenryie/strauss", |
28 | 28 | "require": { |
@@ -38,41 +38,41 @@ discard block |
||
38 | 38 | } |
39 | 39 | EOD; |
40 | 40 | |
41 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
41 | + file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
42 | 42 | |
43 | - chdir($this->testsWorkingDir); |
|
43 | + chdir($this->testsWorkingDir); |
|
44 | 44 | |
45 | - exec('composer install'); |
|
45 | + exec('composer install'); |
|
46 | 46 | |
47 | - $projectComposerPackage = new ProjectComposerPackage($this->testsWorkingDir); |
|
47 | + $projectComposerPackage = new ProjectComposerPackage($this->testsWorkingDir); |
|
48 | 48 | |
49 | - // Only one because we haven't run "flat dependency list". |
|
50 | - $dependencies = array_map(function ($element) { |
|
51 | - $dir = $this->testsWorkingDir . 'vendor'. DIRECTORY_SEPARATOR . $element; |
|
52 | - return new ComposerPackage($dir); |
|
53 | - }, $projectComposerPackage->getRequiresNames()); |
|
49 | + // Only one because we haven't run "flat dependency list". |
|
50 | + $dependencies = array_map(function ($element) { |
|
51 | + $dir = $this->testsWorkingDir . 'vendor'. DIRECTORY_SEPARATOR . $element; |
|
52 | + return new ComposerPackage($dir); |
|
53 | + }, $projectComposerPackage->getRequiresNames()); |
|
54 | 54 | |
55 | - $workingDir = $this->testsWorkingDir; |
|
56 | - $config = $this->createStub(StraussConfig::class); |
|
55 | + $workingDir = $this->testsWorkingDir; |
|
56 | + $config = $this->createStub(StraussConfig::class); |
|
57 | 57 | |
58 | - $fileEnumerator = new FileEnumerator($dependencies, $workingDir, $config); |
|
58 | + $fileEnumerator = new FileEnumerator($dependencies, $workingDir, $config); |
|
59 | 59 | |
60 | - $fileEnumerator->compileFileList(); |
|
60 | + $fileEnumerator->compileFileList(); |
|
61 | 61 | |
62 | - $list = array_keys($fileEnumerator->getAllFilesAndDependencyList()); |
|
62 | + $list = array_keys($fileEnumerator->getAllFilesAndDependencyList()); |
|
63 | 63 | |
64 | - $this->assertContains('google/apiclient/src/aliases.php', $list); |
|
65 | - } |
|
64 | + $this->assertContains('google/apiclient/src/aliases.php', $list); |
|
65 | + } |
|
66 | 66 | |
67 | 67 | |
68 | - public function testClassmapAutoloader() |
|
69 | - { |
|
70 | - $this->markTestIncomplete(); |
|
71 | - } |
|
68 | + public function testClassmapAutoloader() |
|
69 | + { |
|
70 | + $this->markTestIncomplete(); |
|
71 | + } |
|
72 | 72 | |
73 | 73 | |
74 | - public function testFilesAutoloader() |
|
75 | - { |
|
76 | - $this->markTestIncomplete(); |
|
77 | - } |
|
74 | + public function testFilesAutoloader() |
|
75 | + { |
|
76 | + $this->markTestIncomplete(); |
|
77 | + } |
|
78 | 78 | } |
@@ -38,30 +38,30 @@ |
||
38 | 38 | } |
39 | 39 | EOD; |
40 | 40 | |
41 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
41 | + file_put_contents( $this->testsWorkingDir . '/composer.json', $composerJsonString ); |
|
42 | 42 | |
43 | - chdir($this->testsWorkingDir); |
|
43 | + chdir( $this->testsWorkingDir ); |
|
44 | 44 | |
45 | - exec('composer install'); |
|
45 | + exec( 'composer install' ); |
|
46 | 46 | |
47 | - $projectComposerPackage = new ProjectComposerPackage($this->testsWorkingDir); |
|
47 | + $projectComposerPackage = new ProjectComposerPackage( $this->testsWorkingDir ); |
|
48 | 48 | |
49 | 49 | // Only one because we haven't run "flat dependency list". |
50 | - $dependencies = array_map(function ($element) { |
|
51 | - $dir = $this->testsWorkingDir . 'vendor'. DIRECTORY_SEPARATOR . $element; |
|
52 | - return new ComposerPackage($dir); |
|
53 | - }, $projectComposerPackage->getRequiresNames()); |
|
50 | + $dependencies = array_map( function( $element ) { |
|
51 | + $dir = $this->testsWorkingDir . 'vendor' . DIRECTORY_SEPARATOR . $element; |
|
52 | + return new ComposerPackage( $dir ); |
|
53 | + }, $projectComposerPackage->getRequiresNames() ); |
|
54 | 54 | |
55 | 55 | $workingDir = $this->testsWorkingDir; |
56 | - $config = $this->createStub(StraussConfig::class); |
|
56 | + $config = $this->createStub( StraussConfig::class ); |
|
57 | 57 | |
58 | - $fileEnumerator = new FileEnumerator($dependencies, $workingDir, $config); |
|
58 | + $fileEnumerator = new FileEnumerator( $dependencies, $workingDir, $config ); |
|
59 | 59 | |
60 | 60 | $fileEnumerator->compileFileList(); |
61 | 61 | |
62 | - $list = array_keys($fileEnumerator->getAllFilesAndDependencyList()); |
|
62 | + $list = array_keys( $fileEnumerator->getAllFilesAndDependencyList() ); |
|
63 | 63 | |
64 | - $this->assertContains('google/apiclient/src/aliases.php', $list); |
|
64 | + $this->assertContains( 'google/apiclient/src/aliases.php', $list ); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 |
@@ -16,11 +16,9 @@ discard block |
||
16 | 16 | * @package BrianHenryIE\Strauss |
17 | 17 | * @coversNothing |
18 | 18 | */ |
19 | -class FileEnumeratorIntegrationTest extends IntegrationTestCase |
|
20 | -{ |
|
19 | +class FileEnumeratorIntegrationTest extends IntegrationTestCase { |
|
21 | 20 | |
22 | - public function testBuildFileList() |
|
23 | - { |
|
21 | + public function testBuildFileList() { |
|
24 | 22 | |
25 | 23 | $composerJsonString = <<<'EOD' |
26 | 24 | { |
@@ -65,14 +63,12 @@ discard block |
||
65 | 63 | } |
66 | 64 | |
67 | 65 | |
68 | - public function testClassmapAutoloader() |
|
69 | - { |
|
66 | + public function testClassmapAutoloader() { |
|
70 | 67 | $this->markTestIncomplete(); |
71 | 68 | } |
72 | 69 | |
73 | 70 | |
74 | - public function testFilesAutoloader() |
|
75 | - { |
|
71 | + public function testFilesAutoloader() { |
|
76 | 72 | $this->markTestIncomplete(); |
77 | 73 | } |
78 | 74 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | } |
37 | 37 | } |
38 | 38 | } |
39 | -EOD; |
|
39 | +eod; |
|
40 | 40 | |
41 | 41 | file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
42 | 42 |
@@ -18,13 +18,13 @@ discard block |
||
18 | 18 | class ChangeEnumeratorIntegrationTest extends IntegrationTestCase |
19 | 19 | { |
20 | 20 | |
21 | - /** |
|
22 | - * Given a list of files, find all the global classes and the namespaces. |
|
23 | - */ |
|
24 | - public function testOne() |
|
25 | - { |
|
21 | + /** |
|
22 | + * Given a list of files, find all the global classes and the namespaces. |
|
23 | + */ |
|
24 | + public function testOne() |
|
25 | + { |
|
26 | 26 | |
27 | - $composerJsonString = <<<'EOD' |
|
27 | + $composerJsonString = <<<'EOD' |
|
28 | 28 | { |
29 | 29 | "name": "brianhenryie/strauss", |
30 | 30 | "require": { |
@@ -40,53 +40,53 @@ discard block |
||
40 | 40 | } |
41 | 41 | EOD; |
42 | 42 | |
43 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
43 | + file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
44 | 44 | |
45 | - chdir($this->testsWorkingDir); |
|
45 | + chdir($this->testsWorkingDir); |
|
46 | 46 | |
47 | - exec('composer install'); |
|
47 | + exec('composer install'); |
|
48 | 48 | |
49 | - $projectComposerPackage = new ProjectComposerPackage($this->testsWorkingDir); |
|
49 | + $projectComposerPackage = new ProjectComposerPackage($this->testsWorkingDir); |
|
50 | 50 | |
51 | - $dependencies = array_map(function ($element) { |
|
52 | - $dir = $this->testsWorkingDir . 'vendor'. DIRECTORY_SEPARATOR . $element; |
|
53 | - return new ComposerPackage($dir); |
|
54 | - }, $projectComposerPackage->getRequiresNames()); |
|
51 | + $dependencies = array_map(function ($element) { |
|
52 | + $dir = $this->testsWorkingDir . 'vendor'. DIRECTORY_SEPARATOR . $element; |
|
53 | + return new ComposerPackage($dir); |
|
54 | + }, $projectComposerPackage->getRequiresNames()); |
|
55 | 55 | |
56 | - $workingDir = $this->testsWorkingDir; |
|
57 | - $relativeTargetDir = 'strauss' . DIRECTORY_SEPARATOR; |
|
56 | + $workingDir = $this->testsWorkingDir; |
|
57 | + $relativeTargetDir = 'strauss' . DIRECTORY_SEPARATOR; |
|
58 | 58 | |
59 | - $config = $this->createStub(StraussConfig::class); |
|
59 | + $config = $this->createStub(StraussConfig::class); |
|
60 | 60 | |
61 | - $fileEnumerator = new FileEnumerator($dependencies, $workingDir, $config); |
|
61 | + $fileEnumerator = new FileEnumerator($dependencies, $workingDir, $config); |
|
62 | 62 | |
63 | - $fileEnumerator->compileFileList(); |
|
63 | + $fileEnumerator->compileFileList(); |
|
64 | 64 | |
65 | - $copier = new Copier($fileEnumerator->getAllFilesAndDependencyList(), $workingDir, $relativeTargetDir); |
|
65 | + $copier = new Copier($fileEnumerator->getAllFilesAndDependencyList(), $workingDir, $relativeTargetDir); |
|
66 | 66 | |
67 | - $copier->prepareTarget(); |
|
67 | + $copier->prepareTarget(); |
|
68 | 68 | |
69 | - $copier->copy(); |
|
69 | + $copier->copy(); |
|
70 | 70 | |
71 | - $config = $this->createStub(StraussConfig::class); |
|
71 | + $config = $this->createStub(StraussConfig::class); |
|
72 | 72 | |
73 | - $config->method('getExcludePackagesFromPrefixing')->willReturn(array()); |
|
74 | - $config->method('getExcludeNamespacesFromPrefixing')->willReturn(array()); |
|
73 | + $config->method('getExcludePackagesFromPrefixing')->willReturn(array()); |
|
74 | + $config->method('getExcludeNamespacesFromPrefixing')->willReturn(array()); |
|
75 | 75 | |
76 | - $changeEnumerator = new ChangeEnumerator($config); |
|
76 | + $changeEnumerator = new ChangeEnumerator($config); |
|
77 | 77 | |
78 | - $phpFileList = $fileEnumerator->getPhpFilesAndDependencyList(); |
|
78 | + $phpFileList = $fileEnumerator->getPhpFilesAndDependencyList(); |
|
79 | 79 | |
80 | - $changeEnumerator->findInFiles($workingDir . $relativeTargetDir, $phpFileList); |
|
80 | + $changeEnumerator->findInFiles($workingDir . $relativeTargetDir, $phpFileList); |
|
81 | 81 | |
82 | 82 | |
83 | - $classes = $changeEnumerator->getDiscoveredClasses(); |
|
83 | + $classes = $changeEnumerator->getDiscoveredClasses(); |
|
84 | 84 | |
85 | - $namespaces = $changeEnumerator->getDiscoveredNamespaceReplacements(); |
|
85 | + $namespaces = $changeEnumerator->getDiscoveredNamespaceReplacements(); |
|
86 | 86 | |
87 | - $this->assertNotEmpty($classes); |
|
88 | - $this->assertNotEmpty($namespaces); |
|
87 | + $this->assertNotEmpty($classes); |
|
88 | + $this->assertNotEmpty($namespaces); |
|
89 | 89 | |
90 | - $this->assertContains('Google_Task_Composer', $classes); |
|
91 | - } |
|
90 | + $this->assertContains('Google_Task_Composer', $classes); |
|
91 | + } |
|
92 | 92 | } |
@@ -40,53 +40,53 @@ |
||
40 | 40 | } |
41 | 41 | EOD; |
42 | 42 | |
43 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
43 | + file_put_contents( $this->testsWorkingDir . '/composer.json', $composerJsonString ); |
|
44 | 44 | |
45 | - chdir($this->testsWorkingDir); |
|
45 | + chdir( $this->testsWorkingDir ); |
|
46 | 46 | |
47 | - exec('composer install'); |
|
47 | + exec( 'composer install' ); |
|
48 | 48 | |
49 | - $projectComposerPackage = new ProjectComposerPackage($this->testsWorkingDir); |
|
49 | + $projectComposerPackage = new ProjectComposerPackage( $this->testsWorkingDir ); |
|
50 | 50 | |
51 | - $dependencies = array_map(function ($element) { |
|
52 | - $dir = $this->testsWorkingDir . 'vendor'. DIRECTORY_SEPARATOR . $element; |
|
53 | - return new ComposerPackage($dir); |
|
54 | - }, $projectComposerPackage->getRequiresNames()); |
|
51 | + $dependencies = array_map( function( $element ) { |
|
52 | + $dir = $this->testsWorkingDir . 'vendor' . DIRECTORY_SEPARATOR . $element; |
|
53 | + return new ComposerPackage( $dir ); |
|
54 | + }, $projectComposerPackage->getRequiresNames() ); |
|
55 | 55 | |
56 | 56 | $workingDir = $this->testsWorkingDir; |
57 | 57 | $relativeTargetDir = 'strauss' . DIRECTORY_SEPARATOR; |
58 | 58 | |
59 | - $config = $this->createStub(StraussConfig::class); |
|
59 | + $config = $this->createStub( StraussConfig::class ); |
|
60 | 60 | |
61 | - $fileEnumerator = new FileEnumerator($dependencies, $workingDir, $config); |
|
61 | + $fileEnumerator = new FileEnumerator( $dependencies, $workingDir, $config ); |
|
62 | 62 | |
63 | 63 | $fileEnumerator->compileFileList(); |
64 | 64 | |
65 | - $copier = new Copier($fileEnumerator->getAllFilesAndDependencyList(), $workingDir, $relativeTargetDir); |
|
65 | + $copier = new Copier( $fileEnumerator->getAllFilesAndDependencyList(), $workingDir, $relativeTargetDir ); |
|
66 | 66 | |
67 | 67 | $copier->prepareTarget(); |
68 | 68 | |
69 | 69 | $copier->copy(); |
70 | 70 | |
71 | - $config = $this->createStub(StraussConfig::class); |
|
71 | + $config = $this->createStub( StraussConfig::class ); |
|
72 | 72 | |
73 | - $config->method('getExcludePackagesFromPrefixing')->willReturn(array()); |
|
74 | - $config->method('getExcludeNamespacesFromPrefixing')->willReturn(array()); |
|
73 | + $config->method( 'getExcludePackagesFromPrefixing' )->willReturn( array() ); |
|
74 | + $config->method( 'getExcludeNamespacesFromPrefixing' )->willReturn( array() ); |
|
75 | 75 | |
76 | - $changeEnumerator = new ChangeEnumerator($config); |
|
76 | + $changeEnumerator = new ChangeEnumerator( $config ); |
|
77 | 77 | |
78 | 78 | $phpFileList = $fileEnumerator->getPhpFilesAndDependencyList(); |
79 | 79 | |
80 | - $changeEnumerator->findInFiles($workingDir . $relativeTargetDir, $phpFileList); |
|
80 | + $changeEnumerator->findInFiles( $workingDir . $relativeTargetDir, $phpFileList ); |
|
81 | 81 | |
82 | 82 | |
83 | 83 | $classes = $changeEnumerator->getDiscoveredClasses(); |
84 | 84 | |
85 | 85 | $namespaces = $changeEnumerator->getDiscoveredNamespaceReplacements(); |
86 | 86 | |
87 | - $this->assertNotEmpty($classes); |
|
88 | - $this->assertNotEmpty($namespaces); |
|
87 | + $this->assertNotEmpty( $classes ); |
|
88 | + $this->assertNotEmpty( $namespaces ); |
|
89 | 89 | |
90 | - $this->assertContains('Google_Task_Composer', $classes); |
|
90 | + $this->assertContains( 'Google_Task_Composer', $classes ); |
|
91 | 91 | } |
92 | 92 | } |
@@ -15,14 +15,12 @@ |
||
15 | 15 | * @package BrianHenryIE\Strauss |
16 | 16 | * @coversNothing |
17 | 17 | */ |
18 | -class ChangeEnumeratorIntegrationTest extends IntegrationTestCase |
|
19 | -{ |
|
18 | +class ChangeEnumeratorIntegrationTest extends IntegrationTestCase { |
|
20 | 19 | |
21 | 20 | /** |
22 | 21 | * Given a list of files, find all the global classes and the namespaces. |
23 | 22 | */ |
24 | - public function testOne() |
|
25 | - { |
|
23 | + public function testOne() { |
|
26 | 24 | |
27 | 25 | $composerJsonString = <<<'EOD' |
28 | 26 | { |
@@ -36,7 +36,7 @@ |
||
36 | 36 | } |
37 | 37 | } |
38 | 38 | } |
39 | -EOD; |
|
39 | +eod; |
|
40 | 40 | |
41 | 41 | file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
42 | 42 |
@@ -22,23 +22,23 @@ discard block |
||
22 | 22 | class MozartIssue66Test extends IntegrationTestCase |
23 | 23 | { |
24 | 24 | |
25 | - /** |
|
26 | - * |
|
27 | - * php-di's composer.json's autoload key: |
|
28 | - * |
|
29 | - * "autoload": { |
|
30 | - * "psr-4": { |
|
31 | - * "DI\\": "src/" |
|
32 | - * }, |
|
33 | - * "files": [ |
|
34 | - * "src/functions.php" |
|
35 | - * ] |
|
36 | - * }, |
|
37 | - */ |
|
38 | - public function testFilesAutoloaderIsUsed() |
|
39 | - { |
|
25 | + /** |
|
26 | + * |
|
27 | + * php-di's composer.json's autoload key: |
|
28 | + * |
|
29 | + * "autoload": { |
|
30 | + * "psr-4": { |
|
31 | + * "DI\\": "src/" |
|
32 | + * }, |
|
33 | + * "files": [ |
|
34 | + * "src/functions.php" |
|
35 | + * ] |
|
36 | + * }, |
|
37 | + */ |
|
38 | + public function testFilesAutoloaderIsUsed() |
|
39 | + { |
|
40 | 40 | |
41 | - $composerJsonString = <<<'EOD' |
|
41 | + $composerJsonString = <<<'EOD' |
|
42 | 42 | { |
43 | 43 | "name": "markjaquith/mozart-bug-example", |
44 | 44 | "require": { |
@@ -64,19 +64,19 @@ discard block |
||
64 | 64 | |
65 | 65 | EOD; |
66 | 66 | |
67 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
67 | + file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
68 | 68 | |
69 | - chdir($this->testsWorkingDir); |
|
69 | + chdir($this->testsWorkingDir); |
|
70 | 70 | |
71 | - exec('composer install'); |
|
71 | + exec('composer install'); |
|
72 | 72 | |
73 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
74 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
73 | + $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
74 | + $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
75 | 75 | |
76 | - $mozartCompose = new Compose(); |
|
76 | + $mozartCompose = new Compose(); |
|
77 | 77 | |
78 | - $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
78 | + $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
79 | 79 | |
80 | - $this->assertFileExists($this->testsWorkingDir . 'strauss/php-di/php-di/src/functions.php'); |
|
81 | - } |
|
80 | + $this->assertFileExists($this->testsWorkingDir . 'strauss/php-di/php-di/src/functions.php'); |
|
81 | + } |
|
82 | 82 | } |
@@ -64,19 +64,19 @@ |
||
64 | 64 | |
65 | 65 | EOD; |
66 | 66 | |
67 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
67 | + file_put_contents( $this->testsWorkingDir . '/composer.json', $composerJsonString ); |
|
68 | 68 | |
69 | - chdir($this->testsWorkingDir); |
|
69 | + chdir( $this->testsWorkingDir ); |
|
70 | 70 | |
71 | - exec('composer install'); |
|
71 | + exec( 'composer install' ); |
|
72 | 72 | |
73 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
74 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
73 | + $inputInterfaceMock = $this->createMock( InputInterface::class ); |
|
74 | + $outputInterfaceMock = $this->createMock( OutputInterface::class ); |
|
75 | 75 | |
76 | 76 | $mozartCompose = new Compose(); |
77 | 77 | |
78 | - $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
78 | + $mozartCompose->run( $inputInterfaceMock, $outputInterfaceMock ); |
|
79 | 79 | |
80 | - $this->assertFileExists($this->testsWorkingDir . 'strauss/php-di/php-di/src/functions.php'); |
|
80 | + $this->assertFileExists( $this->testsWorkingDir . 'strauss/php-di/php-di/src/functions.php' ); |
|
81 | 81 | } |
82 | 82 | } |
@@ -19,8 +19,7 @@ discard block |
||
19 | 19 | * @package BrianHenryIE\Strauss\Tests\Issues |
20 | 20 | * @coversNothing |
21 | 21 | */ |
22 | -class MozartIssue66Test extends IntegrationTestCase |
|
23 | -{ |
|
22 | +class MozartIssue66Test extends IntegrationTestCase { |
|
24 | 23 | |
25 | 24 | /** |
26 | 25 | * |
@@ -35,8 +34,7 @@ discard block |
||
35 | 34 | * ] |
36 | 35 | * }, |
37 | 36 | */ |
38 | - public function testFilesAutoloaderIsUsed() |
|
39 | - { |
|
37 | + public function testFilesAutoloaderIsUsed() { |
|
40 | 38 | |
41 | 39 | $composerJsonString = <<<'EOD' |
42 | 40 | { |
@@ -62,7 +62,7 @@ |
||
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
65 | -EOD; |
|
65 | +eod; |
|
66 | 66 | |
67 | 67 | file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
68 | 68 |
@@ -17,13 +17,13 @@ discard block |
||
17 | 17 | class StraussIssue8Test extends \BrianHenryIE\Strauss\Tests\Integration\Util\IntegrationTestCase |
18 | 18 | { |
19 | 19 | |
20 | - /** |
|
21 | - * @author BrianHenryIE |
|
22 | - */ |
|
23 | - public function test_delete_vendor_files() |
|
24 | - { |
|
20 | + /** |
|
21 | + * @author BrianHenryIE |
|
22 | + */ |
|
23 | + public function test_delete_vendor_files() |
|
24 | + { |
|
25 | 25 | |
26 | - $composerJsonString = <<<'EOD' |
|
26 | + $composerJsonString = <<<'EOD' |
|
27 | 27 | { |
28 | 28 | "name": "brianhenryie/strauss-issue-8", |
29 | 29 | "require": { |
@@ -37,21 +37,21 @@ discard block |
||
37 | 37 | } |
38 | 38 | EOD; |
39 | 39 | |
40 | - file_put_contents($this->testsWorkingDir . 'composer.json', $composerJsonString); |
|
40 | + file_put_contents($this->testsWorkingDir . 'composer.json', $composerJsonString); |
|
41 | 41 | |
42 | - chdir($this->testsWorkingDir); |
|
42 | + chdir($this->testsWorkingDir); |
|
43 | 43 | |
44 | - exec('composer install'); |
|
44 | + exec('composer install'); |
|
45 | 45 | |
46 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
47 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
46 | + $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
47 | + $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
48 | 48 | |
49 | - $mozartCompose = new Compose(); |
|
49 | + $mozartCompose = new Compose(); |
|
50 | 50 | |
51 | - $result = $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
51 | + $result = $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
52 | 52 | |
53 | - $this->assertEquals(0, $result); |
|
53 | + $this->assertEquals(0, $result); |
|
54 | 54 | |
55 | - $this->assertFileDoesNotExist($this->testsWorkingDir. 'vendor/htmlburger/carbon-fields/core/Carbon_Fields.php'); |
|
56 | - } |
|
55 | + $this->assertFileDoesNotExist($this->testsWorkingDir. 'vendor/htmlburger/carbon-fields/core/Carbon_Fields.php'); |
|
56 | + } |
|
57 | 57 | } |
@@ -37,21 +37,21 @@ |
||
37 | 37 | } |
38 | 38 | EOD; |
39 | 39 | |
40 | - file_put_contents($this->testsWorkingDir . 'composer.json', $composerJsonString); |
|
40 | + file_put_contents( $this->testsWorkingDir . 'composer.json', $composerJsonString ); |
|
41 | 41 | |
42 | - chdir($this->testsWorkingDir); |
|
42 | + chdir( $this->testsWorkingDir ); |
|
43 | 43 | |
44 | - exec('composer install'); |
|
44 | + exec( 'composer install' ); |
|
45 | 45 | |
46 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
47 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
46 | + $inputInterfaceMock = $this->createMock( InputInterface::class ); |
|
47 | + $outputInterfaceMock = $this->createMock( OutputInterface::class ); |
|
48 | 48 | |
49 | 49 | $mozartCompose = new Compose(); |
50 | 50 | |
51 | - $result = $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
51 | + $result = $mozartCompose->run( $inputInterfaceMock, $outputInterfaceMock ); |
|
52 | 52 | |
53 | - $this->assertEquals(0, $result); |
|
53 | + $this->assertEquals( 0, $result ); |
|
54 | 54 | |
55 | - $this->assertFileDoesNotExist($this->testsWorkingDir. 'vendor/htmlburger/carbon-fields/core/Carbon_Fields.php'); |
|
55 | + $this->assertFileDoesNotExist( $this->testsWorkingDir . 'vendor/htmlburger/carbon-fields/core/Carbon_Fields.php' ); |
|
56 | 56 | } |
57 | 57 | } |
@@ -14,14 +14,12 @@ |
||
14 | 14 | * @package BrianHenryIE\Strauss\Tests\Issues |
15 | 15 | * @coversNothing |
16 | 16 | */ |
17 | -class StraussIssue8Test extends \BrianHenryIE\Strauss\Tests\Integration\Util\IntegrationTestCase |
|
18 | -{ |
|
17 | +class StraussIssue8Test extends \BrianHenryIE\Strauss\Tests\Integration\Util\IntegrationTestCase { |
|
19 | 18 | |
20 | 19 | /** |
21 | 20 | * @author BrianHenryIE |
22 | 21 | */ |
23 | - public function test_delete_vendor_files() |
|
24 | - { |
|
22 | + public function test_delete_vendor_files() { |
|
25 | 23 | |
26 | 24 | $composerJsonString = <<<'EOD' |
27 | 25 | { |
@@ -35,7 +35,7 @@ |
||
35 | 35 | } |
36 | 36 | } |
37 | 37 | } |
38 | -EOD; |
|
38 | +eod; |
|
39 | 39 | |
40 | 40 | file_put_contents($this->testsWorkingDir . 'composer.json', $composerJsonString); |
41 | 41 |
@@ -22,13 +22,13 @@ discard block |
||
22 | 22 | class MozartIssue130Test extends \BrianHenryIE\Strauss\Tests\Integration\Util\IntegrationTestCase |
23 | 23 | { |
24 | 24 | |
25 | - /** |
|
26 | - * @author BrianHenryIE |
|
27 | - */ |
|
28 | - public function test_config_copied() |
|
29 | - { |
|
25 | + /** |
|
26 | + * @author BrianHenryIE |
|
27 | + */ |
|
28 | + public function test_config_copied() |
|
29 | + { |
|
30 | 30 | |
31 | - $composerJsonString = <<<'EOD' |
|
31 | + $composerJsonString = <<<'EOD' |
|
32 | 32 | { |
33 | 33 | "name": "brianhenryie/mozart-issue-130", |
34 | 34 | "require": { |
@@ -56,19 +56,19 @@ discard block |
||
56 | 56 | } |
57 | 57 | EOD; |
58 | 58 | |
59 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
59 | + file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
60 | 60 | |
61 | - chdir($this->testsWorkingDir); |
|
61 | + chdir($this->testsWorkingDir); |
|
62 | 62 | |
63 | - exec('composer install'); |
|
63 | + exec('composer install'); |
|
64 | 64 | |
65 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
66 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
65 | + $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
66 | + $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
67 | 67 | |
68 | - $mozartCompose = new Compose(); |
|
68 | + $mozartCompose = new Compose(); |
|
69 | 69 | |
70 | - $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
70 | + $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
71 | 71 | |
72 | - $this->assertFileExists($this->testsWorkingDir .'strauss/htmlburger/carbon-fields/config.php'); |
|
73 | - } |
|
72 | + $this->assertFileExists($this->testsWorkingDir .'strauss/htmlburger/carbon-fields/config.php'); |
|
73 | + } |
|
74 | 74 | } |
@@ -56,19 +56,19 @@ |
||
56 | 56 | } |
57 | 57 | EOD; |
58 | 58 | |
59 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
59 | + file_put_contents( $this->testsWorkingDir . '/composer.json', $composerJsonString ); |
|
60 | 60 | |
61 | - chdir($this->testsWorkingDir); |
|
61 | + chdir( $this->testsWorkingDir ); |
|
62 | 62 | |
63 | - exec('composer install'); |
|
63 | + exec( 'composer install' ); |
|
64 | 64 | |
65 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
66 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
65 | + $inputInterfaceMock = $this->createMock( InputInterface::class ); |
|
66 | + $outputInterfaceMock = $this->createMock( OutputInterface::class ); |
|
67 | 67 | |
68 | 68 | $mozartCompose = new Compose(); |
69 | 69 | |
70 | - $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
70 | + $mozartCompose->run( $inputInterfaceMock, $outputInterfaceMock ); |
|
71 | 71 | |
72 | - $this->assertFileExists($this->testsWorkingDir .'strauss/htmlburger/carbon-fields/config.php'); |
|
72 | + $this->assertFileExists( $this->testsWorkingDir . 'strauss/htmlburger/carbon-fields/config.php' ); |
|
73 | 73 | } |
74 | 74 | } |
@@ -19,14 +19,12 @@ |
||
19 | 19 | * @package BrianHenryIE\Strauss\Tests\Issues |
20 | 20 | * @coversNothing |
21 | 21 | */ |
22 | -class MozartIssue130Test extends \BrianHenryIE\Strauss\Tests\Integration\Util\IntegrationTestCase |
|
23 | -{ |
|
22 | +class MozartIssue130Test extends \BrianHenryIE\Strauss\Tests\Integration\Util\IntegrationTestCase { |
|
24 | 23 | |
25 | 24 | /** |
26 | 25 | * @author BrianHenryIE |
27 | 26 | */ |
28 | - public function test_config_copied() |
|
29 | - { |
|
27 | + public function test_config_copied() { |
|
30 | 28 | |
31 | 29 | $composerJsonString = <<<'EOD' |
32 | 30 | { |
@@ -36,7 +36,7 @@ |
||
36 | 36 | } |
37 | 37 | } |
38 | 38 | } |
39 | -EOD; |
|
39 | +eod; |
|
40 | 40 | |
41 | 41 | file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
42 | 42 |
@@ -18,16 +18,16 @@ discard block |
||
18 | 18 | class MozartIssue128Test extends IntegrationTestCase |
19 | 19 | { |
20 | 20 | |
21 | - /** |
|
22 | - * Because the neither package was a sub-package of the other, the replacing was not occurring |
|
23 | - * throughout. |
|
24 | - */ |
|
25 | - public function test_it_does_not_make_classname_replacement_inside_namespaced_file() |
|
26 | - { |
|
21 | + /** |
|
22 | + * Because the neither package was a sub-package of the other, the replacing was not occurring |
|
23 | + * throughout. |
|
24 | + */ |
|
25 | + public function test_it_does_not_make_classname_replacement_inside_namespaced_file() |
|
26 | + { |
|
27 | 27 | |
28 | - $this->markTestSkipped("Failing on PHP 8"); |
|
28 | + $this->markTestSkipped("Failing on PHP 8"); |
|
29 | 29 | |
30 | - $composerJsonString = <<<'EOD' |
|
30 | + $composerJsonString = <<<'EOD' |
|
31 | 31 | { |
32 | 32 | "require": { |
33 | 33 | "setasign/fpdf": "1.8", |
@@ -45,27 +45,27 @@ discard block |
||
45 | 45 | } |
46 | 46 | EOD; |
47 | 47 | |
48 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
48 | + file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
49 | 49 | |
50 | - chdir($this->testsWorkingDir); |
|
50 | + chdir($this->testsWorkingDir); |
|
51 | 51 | |
52 | - exec('composer install'); |
|
52 | + exec('composer install'); |
|
53 | 53 | |
54 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
55 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
54 | + $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
55 | + $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
56 | 56 | |
57 | - $mozartCompose = new Compose(); |
|
57 | + $mozartCompose = new Compose(); |
|
58 | 58 | |
59 | - $result = $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
59 | + $result = $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
60 | 60 | |
61 | - assert(0 === $result); |
|
61 | + assert(0 === $result); |
|
62 | 62 | |
63 | - $mpdf_php = file_get_contents($this->testsWorkingDir .'strauss/setasign/fpdi/src/FpdfTpl.php'); |
|
63 | + $mpdf_php = file_get_contents($this->testsWorkingDir .'strauss/setasign/fpdi/src/FpdfTpl.php'); |
|
64 | 64 | |
65 | - // Confirm problem is gone. |
|
66 | - $this->assertStringNotContainsString('class FpdfTpl extends \FPDF', $mpdf_php); |
|
65 | + // Confirm problem is gone. |
|
66 | + $this->assertStringNotContainsString('class FpdfTpl extends \FPDF', $mpdf_php); |
|
67 | 67 | |
68 | - // Confirm solution is correct. |
|
69 | - $this->assertStringContainsString('class FpdfTpl extends \Strauss_FPDF', $mpdf_php); |
|
70 | - } |
|
68 | + // Confirm solution is correct. |
|
69 | + $this->assertStringContainsString('class FpdfTpl extends \Strauss_FPDF', $mpdf_php); |
|
70 | + } |
|
71 | 71 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | public function test_it_does_not_make_classname_replacement_inside_namespaced_file() |
26 | 26 | { |
27 | 27 | |
28 | - $this->markTestSkipped("Failing on PHP 8"); |
|
28 | + $this->markTestSkipped( "Failing on PHP 8" ); |
|
29 | 29 | |
30 | 30 | $composerJsonString = <<<'EOD' |
31 | 31 | { |
@@ -45,27 +45,27 @@ discard block |
||
45 | 45 | } |
46 | 46 | EOD; |
47 | 47 | |
48 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
48 | + file_put_contents( $this->testsWorkingDir . '/composer.json', $composerJsonString ); |
|
49 | 49 | |
50 | - chdir($this->testsWorkingDir); |
|
50 | + chdir( $this->testsWorkingDir ); |
|
51 | 51 | |
52 | - exec('composer install'); |
|
52 | + exec( 'composer install' ); |
|
53 | 53 | |
54 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
55 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
54 | + $inputInterfaceMock = $this->createMock( InputInterface::class ); |
|
55 | + $outputInterfaceMock = $this->createMock( OutputInterface::class ); |
|
56 | 56 | |
57 | 57 | $mozartCompose = new Compose(); |
58 | 58 | |
59 | - $result = $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
59 | + $result = $mozartCompose->run( $inputInterfaceMock, $outputInterfaceMock ); |
|
60 | 60 | |
61 | - assert(0 === $result); |
|
61 | + assert( 0 === $result ); |
|
62 | 62 | |
63 | - $mpdf_php = file_get_contents($this->testsWorkingDir .'strauss/setasign/fpdi/src/FpdfTpl.php'); |
|
63 | + $mpdf_php = file_get_contents( $this->testsWorkingDir . 'strauss/setasign/fpdi/src/FpdfTpl.php' ); |
|
64 | 64 | |
65 | 65 | // Confirm problem is gone. |
66 | - $this->assertStringNotContainsString('class FpdfTpl extends \FPDF', $mpdf_php); |
|
66 | + $this->assertStringNotContainsString( 'class FpdfTpl extends \FPDF', $mpdf_php ); |
|
67 | 67 | |
68 | 68 | // Confirm solution is correct. |
69 | - $this->assertStringContainsString('class FpdfTpl extends \Strauss_FPDF', $mpdf_php); |
|
69 | + $this->assertStringContainsString( 'class FpdfTpl extends \Strauss_FPDF', $mpdf_php ); |
|
70 | 70 | } |
71 | 71 | } |
@@ -15,15 +15,13 @@ |
||
15 | 15 | * Class MozartIssue128Test |
16 | 16 | * @coversNothing |
17 | 17 | */ |
18 | -class MozartIssue128Test extends IntegrationTestCase |
|
19 | -{ |
|
18 | +class MozartIssue128Test extends IntegrationTestCase { |
|
20 | 19 | |
21 | 20 | /** |
22 | 21 | * Because the neither package was a sub-package of the other, the replacing was not occurring |
23 | 22 | * throughout. |
24 | 23 | */ |
25 | - public function test_it_does_not_make_classname_replacement_inside_namespaced_file() |
|
26 | - { |
|
24 | + public function test_it_does_not_make_classname_replacement_inside_namespaced_file() { |
|
27 | 25 | |
28 | 26 | $this->markTestSkipped("Failing on PHP 8"); |
29 | 27 |
@@ -36,7 +36,7 @@ |
||
36 | 36 | } |
37 | 37 | } |
38 | 38 | } |
39 | -EOD; |
|
39 | +eod; |
|
40 | 40 | |
41 | 41 | file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
42 | 42 |
@@ -20,21 +20,21 @@ discard block |
||
20 | 20 | class MozartIssue124Test extends IntegrationTestCase |
21 | 21 | { |
22 | 22 | |
23 | - /** |
|
24 | - * After PR #84, running Mozart on Mpdf began prefixing the class name inside the namespaced file. |
|
25 | - * |
|
26 | - * The problem coming from the filename matching the namespace name? |
|
27 | - * |
|
28 | - * dev-master#5d8041fdefc94ff57edcbe83ab468a9988c4fc11 |
|
29 | - * |
|
30 | - * @see https://github.com/coenjacobs/mozart/pull/84/files |
|
31 | - * |
|
32 | - * Should be: "class Mpdf implements" because its namespace has already been prefixed. |
|
33 | - */ |
|
34 | - public function test_it_does_not_make_classname_replacement_inside_namespaced_file() |
|
35 | - { |
|
36 | - |
|
37 | - $composerJsonString = <<<'EOD' |
|
23 | + /** |
|
24 | + * After PR #84, running Mozart on Mpdf began prefixing the class name inside the namespaced file. |
|
25 | + * |
|
26 | + * The problem coming from the filename matching the namespace name? |
|
27 | + * |
|
28 | + * dev-master#5d8041fdefc94ff57edcbe83ab468a9988c4fc11 |
|
29 | + * |
|
30 | + * @see https://github.com/coenjacobs/mozart/pull/84/files |
|
31 | + * |
|
32 | + * Should be: "class Mpdf implements" because its namespace has already been prefixed. |
|
33 | + */ |
|
34 | + public function test_it_does_not_make_classname_replacement_inside_namespaced_file() |
|
35 | + { |
|
36 | + |
|
37 | + $composerJsonString = <<<'EOD' |
|
38 | 38 | { |
39 | 39 | "name": "brianhenryie/mozart-issue-124", |
40 | 40 | "require": { |
@@ -49,44 +49,44 @@ discard block |
||
49 | 49 | } |
50 | 50 | EOD; |
51 | 51 | |
52 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
52 | + file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
53 | 53 | |
54 | - chdir($this->testsWorkingDir); |
|
54 | + chdir($this->testsWorkingDir); |
|
55 | 55 | |
56 | - exec('composer install'); |
|
56 | + exec('composer install'); |
|
57 | 57 | |
58 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
59 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
58 | + $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
59 | + $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
60 | 60 | |
61 | - $mozartCompose = new Compose(); |
|
61 | + $mozartCompose = new Compose(); |
|
62 | 62 | |
63 | - $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
63 | + $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
64 | 64 | |
65 | - $mpdf_php = file_get_contents($this->testsWorkingDir .'strauss/mpdf/mpdf/src/Mpdf.php'); |
|
65 | + $mpdf_php = file_get_contents($this->testsWorkingDir .'strauss/mpdf/mpdf/src/Mpdf.php'); |
|
66 | 66 | |
67 | - // Confirm problem is gone. |
|
68 | - $this->assertStringNotContainsString('class BrianHenryIE\Strauss\Mpdf implements', $mpdf_php); |
|
67 | + // Confirm problem is gone. |
|
68 | + $this->assertStringNotContainsString('class BrianHenryIE\Strauss\Mpdf implements', $mpdf_php); |
|
69 | 69 | |
70 | - // Confirm solution is correct. |
|
71 | - $this->assertStringContainsString('class Mpdf implements', $mpdf_php); |
|
72 | - } |
|
70 | + // Confirm solution is correct. |
|
71 | + $this->assertStringContainsString('class Mpdf implements', $mpdf_php); |
|
72 | + } |
|
73 | 73 | |
74 | 74 | |
75 | - /** |
|
76 | - * Another Mpdf problem, presumably down to the classname matching the namespace. |
|
77 | - * |
|
78 | - * Typed function properties whose class type (name) match the namespace being replaced are |
|
79 | - * unintentionally prefixed, causing PHP to crash. |
|
80 | - * |
|
81 | - * Occurring at dev-master#3b1243ca8505fa6436569800dc34269178930f39 |
|
82 | - * |
|
83 | - * @see https://github.com/coenjacobs/mozart/issues/124 |
|
84 | - */ |
|
85 | - public function test_it_does_not_prefix_function_argument_types_whose_classname_matches_the_namespace() |
|
86 | - { |
|
75 | + /** |
|
76 | + * Another Mpdf problem, presumably down to the classname matching the namespace. |
|
77 | + * |
|
78 | + * Typed function properties whose class type (name) match the namespace being replaced are |
|
79 | + * unintentionally prefixed, causing PHP to crash. |
|
80 | + * |
|
81 | + * Occurring at dev-master#3b1243ca8505fa6436569800dc34269178930f39 |
|
82 | + * |
|
83 | + * @see https://github.com/coenjacobs/mozart/issues/124 |
|
84 | + */ |
|
85 | + public function test_it_does_not_prefix_function_argument_types_whose_classname_matches_the_namespace() |
|
86 | + { |
|
87 | 87 | |
88 | 88 | |
89 | - $composerJsonString = <<<'EOD' |
|
89 | + $composerJsonString = <<<'EOD' |
|
90 | 90 | { |
91 | 91 | "name": "brianhenryie/mozart-issue-124", |
92 | 92 | "require": { |
@@ -101,41 +101,41 @@ discard block |
||
101 | 101 | } |
102 | 102 | EOD; |
103 | 103 | |
104 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
104 | + file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
105 | 105 | |
106 | - chdir($this->testsWorkingDir); |
|
106 | + chdir($this->testsWorkingDir); |
|
107 | 107 | |
108 | - exec('composer install'); |
|
108 | + exec('composer install'); |
|
109 | 109 | |
110 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
111 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
110 | + $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
111 | + $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
112 | 112 | |
113 | - $mozartCompose = new Compose(); |
|
113 | + $mozartCompose = new Compose(); |
|
114 | 114 | |
115 | - $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
115 | + $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
116 | 116 | |
117 | - $mpdf_php = file_get_contents($this->testsWorkingDir .'/strauss/mpdf/mpdf/src/Conversion/DecToOther.php'); |
|
117 | + $mpdf_php = file_get_contents($this->testsWorkingDir .'/strauss/mpdf/mpdf/src/Conversion/DecToOther.php'); |
|
118 | 118 | |
119 | - // Confirm problem is gone. |
|
120 | - $this->assertStringNotContainsString('public function __construct(BrianHenryIE\Strauss\Mpdf $mpdf)', $mpdf_php); |
|
119 | + // Confirm problem is gone. |
|
120 | + $this->assertStringNotContainsString('public function __construct(BrianHenryIE\Strauss\Mpdf $mpdf)', $mpdf_php); |
|
121 | 121 | |
122 | - // Confirm solution is correct. |
|
123 | - $this->assertStringContainsString('public function __construct(Mpdf $mpdf)', $mpdf_php); |
|
124 | - } |
|
125 | - // src/strauss/mpdf/mpdf/src/Barcode/BarcodeException.php |
|
122 | + // Confirm solution is correct. |
|
123 | + $this->assertStringContainsString('public function __construct(Mpdf $mpdf)', $mpdf_php); |
|
124 | + } |
|
125 | + // src/strauss/mpdf/mpdf/src/Barcode/BarcodeException.php |
|
126 | 126 | |
127 | 127 | |
128 | 128 | |
129 | - /** |
|
130 | - * Another Mpdf problem, presumably down to the classname matching the namespace. |
|
131 | - * |
|
132 | - * @see mpdf/mpdf/src/Barcode/BarcodeException.php |
|
133 | - */ |
|
134 | - public function testItDoesPrefixNamespacedExtends() |
|
135 | - { |
|
129 | + /** |
|
130 | + * Another Mpdf problem, presumably down to the classname matching the namespace. |
|
131 | + * |
|
132 | + * @see mpdf/mpdf/src/Barcode/BarcodeException.php |
|
133 | + */ |
|
134 | + public function testItDoesPrefixNamespacedExtends() |
|
135 | + { |
|
136 | 136 | |
137 | 137 | |
138 | - $composerJsonString = <<<'EOD' |
|
138 | + $composerJsonString = <<<'EOD' |
|
139 | 139 | { |
140 | 140 | "name": "brianhenryie/mozart-issue-124", |
141 | 141 | "require": { |
@@ -150,25 +150,25 @@ discard block |
||
150 | 150 | } |
151 | 151 | EOD; |
152 | 152 | |
153 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
153 | + file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
154 | 154 | |
155 | - chdir($this->testsWorkingDir); |
|
155 | + chdir($this->testsWorkingDir); |
|
156 | 156 | |
157 | - exec('composer install'); |
|
157 | + exec('composer install'); |
|
158 | 158 | |
159 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
160 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
159 | + $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
160 | + $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
161 | 161 | |
162 | - $mozartCompose = new Compose(); |
|
162 | + $mozartCompose = new Compose(); |
|
163 | 163 | |
164 | - $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
164 | + $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
165 | 165 | |
166 | - $mpdf_php = file_get_contents($this->testsWorkingDir .'/strauss/mpdf/mpdf/src/Barcode/BarcodeException.php'); |
|
166 | + $mpdf_php = file_get_contents($this->testsWorkingDir .'/strauss/mpdf/mpdf/src/Barcode/BarcodeException.php'); |
|
167 | 167 | |
168 | - // Confirm problem is gone. |
|
169 | - $this->assertStringNotContainsString('class BarcodeException extends \Mpdf\MpdfException', $mpdf_php); |
|
168 | + // Confirm problem is gone. |
|
169 | + $this->assertStringNotContainsString('class BarcodeException extends \Mpdf\MpdfException', $mpdf_php); |
|
170 | 170 | |
171 | - // Confirm solution is correct. |
|
172 | - $this->assertStringContainsString('class BarcodeException extends \BrianHenryIE\Strauss\Mpdf\MpdfException', $mpdf_php); |
|
173 | - } |
|
171 | + // Confirm solution is correct. |
|
172 | + $this->assertStringContainsString('class BarcodeException extends \BrianHenryIE\Strauss\Mpdf\MpdfException', $mpdf_php); |
|
173 | + } |
|
174 | 174 | } |
@@ -49,26 +49,26 @@ discard block |
||
49 | 49 | } |
50 | 50 | EOD; |
51 | 51 | |
52 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
52 | + file_put_contents( $this->testsWorkingDir . '/composer.json', $composerJsonString ); |
|
53 | 53 | |
54 | - chdir($this->testsWorkingDir); |
|
54 | + chdir( $this->testsWorkingDir ); |
|
55 | 55 | |
56 | - exec('composer install'); |
|
56 | + exec( 'composer install' ); |
|
57 | 57 | |
58 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
59 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
58 | + $inputInterfaceMock = $this->createMock( InputInterface::class ); |
|
59 | + $outputInterfaceMock = $this->createMock( OutputInterface::class ); |
|
60 | 60 | |
61 | 61 | $mozartCompose = new Compose(); |
62 | 62 | |
63 | - $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
63 | + $mozartCompose->run( $inputInterfaceMock, $outputInterfaceMock ); |
|
64 | 64 | |
65 | - $mpdf_php = file_get_contents($this->testsWorkingDir .'strauss/mpdf/mpdf/src/Mpdf.php'); |
|
65 | + $mpdf_php = file_get_contents( $this->testsWorkingDir . 'strauss/mpdf/mpdf/src/Mpdf.php' ); |
|
66 | 66 | |
67 | 67 | // Confirm problem is gone. |
68 | - $this->assertStringNotContainsString('class BrianHenryIE\Strauss\Mpdf implements', $mpdf_php); |
|
68 | + $this->assertStringNotContainsString( 'class BrianHenryIE\Strauss\Mpdf implements', $mpdf_php ); |
|
69 | 69 | |
70 | 70 | // Confirm solution is correct. |
71 | - $this->assertStringContainsString('class Mpdf implements', $mpdf_php); |
|
71 | + $this->assertStringContainsString( 'class Mpdf implements', $mpdf_php ); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | |
@@ -101,26 +101,26 @@ discard block |
||
101 | 101 | } |
102 | 102 | EOD; |
103 | 103 | |
104 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
104 | + file_put_contents( $this->testsWorkingDir . '/composer.json', $composerJsonString ); |
|
105 | 105 | |
106 | - chdir($this->testsWorkingDir); |
|
106 | + chdir( $this->testsWorkingDir ); |
|
107 | 107 | |
108 | - exec('composer install'); |
|
108 | + exec( 'composer install' ); |
|
109 | 109 | |
110 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
111 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
110 | + $inputInterfaceMock = $this->createMock( InputInterface::class ); |
|
111 | + $outputInterfaceMock = $this->createMock( OutputInterface::class ); |
|
112 | 112 | |
113 | 113 | $mozartCompose = new Compose(); |
114 | 114 | |
115 | - $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
115 | + $mozartCompose->run( $inputInterfaceMock, $outputInterfaceMock ); |
|
116 | 116 | |
117 | - $mpdf_php = file_get_contents($this->testsWorkingDir .'/strauss/mpdf/mpdf/src/Conversion/DecToOther.php'); |
|
117 | + $mpdf_php = file_get_contents( $this->testsWorkingDir . '/strauss/mpdf/mpdf/src/Conversion/DecToOther.php' ); |
|
118 | 118 | |
119 | 119 | // Confirm problem is gone. |
120 | - $this->assertStringNotContainsString('public function __construct(BrianHenryIE\Strauss\Mpdf $mpdf)', $mpdf_php); |
|
120 | + $this->assertStringNotContainsString( 'public function __construct(BrianHenryIE\Strauss\Mpdf $mpdf)', $mpdf_php ); |
|
121 | 121 | |
122 | 122 | // Confirm solution is correct. |
123 | - $this->assertStringContainsString('public function __construct(Mpdf $mpdf)', $mpdf_php); |
|
123 | + $this->assertStringContainsString( 'public function __construct(Mpdf $mpdf)', $mpdf_php ); |
|
124 | 124 | } |
125 | 125 | // src/strauss/mpdf/mpdf/src/Barcode/BarcodeException.php |
126 | 126 | |
@@ -150,25 +150,25 @@ discard block |
||
150 | 150 | } |
151 | 151 | EOD; |
152 | 152 | |
153 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
153 | + file_put_contents( $this->testsWorkingDir . '/composer.json', $composerJsonString ); |
|
154 | 154 | |
155 | - chdir($this->testsWorkingDir); |
|
155 | + chdir( $this->testsWorkingDir ); |
|
156 | 156 | |
157 | - exec('composer install'); |
|
157 | + exec( 'composer install' ); |
|
158 | 158 | |
159 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
160 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
159 | + $inputInterfaceMock = $this->createMock( InputInterface::class ); |
|
160 | + $outputInterfaceMock = $this->createMock( OutputInterface::class ); |
|
161 | 161 | |
162 | 162 | $mozartCompose = new Compose(); |
163 | 163 | |
164 | - $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
164 | + $mozartCompose->run( $inputInterfaceMock, $outputInterfaceMock ); |
|
165 | 165 | |
166 | - $mpdf_php = file_get_contents($this->testsWorkingDir .'/strauss/mpdf/mpdf/src/Barcode/BarcodeException.php'); |
|
166 | + $mpdf_php = file_get_contents( $this->testsWorkingDir . '/strauss/mpdf/mpdf/src/Barcode/BarcodeException.php' ); |
|
167 | 167 | |
168 | 168 | // Confirm problem is gone. |
169 | - $this->assertStringNotContainsString('class BarcodeException extends \Mpdf\MpdfException', $mpdf_php); |
|
169 | + $this->assertStringNotContainsString( 'class BarcodeException extends \Mpdf\MpdfException', $mpdf_php ); |
|
170 | 170 | |
171 | 171 | // Confirm solution is correct. |
172 | - $this->assertStringContainsString('class BarcodeException extends \BrianHenryIE\Strauss\Mpdf\MpdfException', $mpdf_php); |
|
172 | + $this->assertStringContainsString( 'class BarcodeException extends \BrianHenryIE\Strauss\Mpdf\MpdfException', $mpdf_php ); |
|
173 | 173 | } |
174 | 174 | } |
@@ -17,8 +17,7 @@ discard block |
||
17 | 17 | * Class MozartIssue124Test |
18 | 18 | * @coversNothing |
19 | 19 | */ |
20 | -class MozartIssue124Test extends IntegrationTestCase |
|
21 | -{ |
|
20 | +class MozartIssue124Test extends IntegrationTestCase { |
|
22 | 21 | |
23 | 22 | /** |
24 | 23 | * After PR #84, running Mozart on Mpdf began prefixing the class name inside the namespaced file. |
@@ -31,8 +30,7 @@ discard block |
||
31 | 30 | * |
32 | 31 | * Should be: "class Mpdf implements" because its namespace has already been prefixed. |
33 | 32 | */ |
34 | - public function test_it_does_not_make_classname_replacement_inside_namespaced_file() |
|
35 | - { |
|
33 | + public function test_it_does_not_make_classname_replacement_inside_namespaced_file() { |
|
36 | 34 | |
37 | 35 | $composerJsonString = <<<'EOD' |
38 | 36 | { |
@@ -82,8 +80,7 @@ discard block |
||
82 | 80 | * |
83 | 81 | * @see https://github.com/coenjacobs/mozart/issues/124 |
84 | 82 | */ |
85 | - public function test_it_does_not_prefix_function_argument_types_whose_classname_matches_the_namespace() |
|
86 | - { |
|
83 | + public function test_it_does_not_prefix_function_argument_types_whose_classname_matches_the_namespace() { |
|
87 | 84 | |
88 | 85 | |
89 | 86 | $composerJsonString = <<<'EOD' |
@@ -131,8 +128,7 @@ discard block |
||
131 | 128 | * |
132 | 129 | * @see mpdf/mpdf/src/Barcode/BarcodeException.php |
133 | 130 | */ |
134 | - public function testItDoesPrefixNamespacedExtends() |
|
135 | - { |
|
131 | + public function testItDoesPrefixNamespacedExtends() { |
|
136 | 132 | |
137 | 133 | |
138 | 134 | $composerJsonString = <<<'EOD' |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | } |
48 | 48 | } |
49 | 49 | } |
50 | -EOD; |
|
50 | +eod; |
|
51 | 51 | |
52 | 52 | file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
53 | 53 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | } |
101 | 101 | } |
102 | -EOD; |
|
102 | +eod; |
|
103 | 103 | |
104 | 104 | file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
105 | 105 | |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | } |
149 | 149 | } |
150 | 150 | } |
151 | -EOD; |
|
151 | +eod; |
|
152 | 152 | |
153 | 153 | file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
154 | 154 |
@@ -22,10 +22,10 @@ discard block |
||
22 | 22 | class MozartIssue109Test extends IntegrationTestCase |
23 | 23 | { |
24 | 24 | |
25 | - public function testTheOutputDoesNotPrefixComments() |
|
26 | - { |
|
25 | + public function testTheOutputDoesNotPrefixComments() |
|
26 | + { |
|
27 | 27 | |
28 | - $composerJsonString = <<<'EOD' |
|
28 | + $composerJsonString = <<<'EOD' |
|
29 | 29 | { |
30 | 30 | "minimum-stability": "dev", |
31 | 31 | "require": { |
@@ -52,21 +52,21 @@ discard block |
||
52 | 52 | } |
53 | 53 | EOD; |
54 | 54 | |
55 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
55 | + file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
56 | 56 | |
57 | - chdir($this->testsWorkingDir); |
|
57 | + chdir($this->testsWorkingDir); |
|
58 | 58 | |
59 | - exec('composer install'); |
|
59 | + exec('composer install'); |
|
60 | 60 | |
61 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
62 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
61 | + $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
62 | + $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
63 | 63 | |
64 | - $mozartCompose = new Compose(); |
|
64 | + $mozartCompose = new Compose(); |
|
65 | 65 | |
66 | - $result = $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
66 | + $result = $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
67 | 67 | |
68 | - $phpString = file_get_contents($this->testsWorkingDir .'strauss/nesbot/carbon/src/Carbon/Carbon.php'); |
|
68 | + $phpString = file_get_contents($this->testsWorkingDir .'strauss/nesbot/carbon/src/Carbon/Carbon.php'); |
|
69 | 69 | |
70 | - $this->assertStringNotContainsString('*Mozart\\ This file is part of the Carbon package.Mozart\\', $phpString); |
|
71 | - } |
|
70 | + $this->assertStringNotContainsString('*Mozart\\ This file is part of the Carbon package.Mozart\\', $phpString); |
|
71 | + } |
|
72 | 72 | } |
@@ -52,21 +52,21 @@ |
||
52 | 52 | } |
53 | 53 | EOD; |
54 | 54 | |
55 | - file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
|
55 | + file_put_contents( $this->testsWorkingDir . '/composer.json', $composerJsonString ); |
|
56 | 56 | |
57 | - chdir($this->testsWorkingDir); |
|
57 | + chdir( $this->testsWorkingDir ); |
|
58 | 58 | |
59 | - exec('composer install'); |
|
59 | + exec( 'composer install' ); |
|
60 | 60 | |
61 | - $inputInterfaceMock = $this->createMock(InputInterface::class); |
|
62 | - $outputInterfaceMock = $this->createMock(OutputInterface::class); |
|
61 | + $inputInterfaceMock = $this->createMock( InputInterface::class ); |
|
62 | + $outputInterfaceMock = $this->createMock( OutputInterface::class ); |
|
63 | 63 | |
64 | 64 | $mozartCompose = new Compose(); |
65 | 65 | |
66 | - $result = $mozartCompose->run($inputInterfaceMock, $outputInterfaceMock); |
|
66 | + $result = $mozartCompose->run( $inputInterfaceMock, $outputInterfaceMock ); |
|
67 | 67 | |
68 | - $phpString = file_get_contents($this->testsWorkingDir .'strauss/nesbot/carbon/src/Carbon/Carbon.php'); |
|
68 | + $phpString = file_get_contents( $this->testsWorkingDir . 'strauss/nesbot/carbon/src/Carbon/Carbon.php' ); |
|
69 | 69 | |
70 | - $this->assertStringNotContainsString('*Mozart\\ This file is part of the Carbon package.Mozart\\', $phpString); |
|
70 | + $this->assertStringNotContainsString( '*Mozart\\ This file is part of the Carbon package.Mozart\\', $phpString ); |
|
71 | 71 | } |
72 | 72 | } |
@@ -19,11 +19,9 @@ |
||
19 | 19 | * @package BrianHenryIE\Strauss\Tests\Issues |
20 | 20 | * @coversNothing |
21 | 21 | */ |
22 | -class MozartIssue109Test extends IntegrationTestCase |
|
23 | -{ |
|
22 | +class MozartIssue109Test extends IntegrationTestCase { |
|
24 | 23 | |
25 | - public function testTheOutputDoesNotPrefixComments() |
|
26 | - { |
|
24 | + public function testTheOutputDoesNotPrefixComments() { |
|
27 | 25 | |
28 | 26 | $composerJsonString = <<<'EOD' |
29 | 27 | { |
@@ -36,7 +36,7 @@ |
||
36 | 36 | } |
37 | 37 | } |
38 | 38 | } |
39 | -EOD; |
|
39 | +eod; |
|
40 | 40 | |
41 | 41 | file_put_contents($this->testsWorkingDir . '/composer.json', $composerJsonString); |
42 | 42 |