@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | public function testGetClasses() |
| 12 | 12 | { |
| 13 | 13 | $classLoader = new ClassLoader(); |
| 14 | - $classLoader->addPsr4('\\Robo\\PluginTest\\', [realpath(__DIR__.'/../../plugins')]); |
|
| 14 | + $classLoader->addPsr4('\\Robo\\PluginTest\\', [realpath(__DIR__ . '/../../plugins')]); |
|
| 15 | 15 | $service = new RelativeNamespaceDiscovery($classLoader); |
| 16 | 16 | $service->setRelativeNamespace('Robo\Plugin'); |
| 17 | 17 | $service->setSearchPattern('/.*Commands?\.php$/'); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | public function testGetFile() |
| 27 | 27 | { |
| 28 | 28 | $classLoader = new ClassLoader(); |
| 29 | - $classLoader->addPsr4('\\Robo\\PluginTest\\', [realpath(__DIR__.'/../../plugins')]); |
|
| 29 | + $classLoader->addPsr4('\\Robo\\PluginTest\\', [realpath(__DIR__ . '/../../plugins')]); |
|
| 30 | 30 | $service = new RelativeNamespaceDiscovery($classLoader); |
| 31 | 31 | $service->setRelativeNamespace('Robo\Plugin'); |
| 32 | 32 | |
@@ -6,9 +6,9 @@ |
||
| 6 | 6 | 'debug' => true, |
| 7 | 7 | 'cacheDir' => '/tmp', |
| 8 | 8 | 'includePaths' => [ |
| 9 | - __DIR__.'/../src', |
|
| 10 | - __DIR__.'/../vendor/symfony/process', |
|
| 11 | - __DIR__.'/../vendor/symfony/console', |
|
| 12 | - __DIR__.'/../vendor/henrikbjorn/lurker/src', |
|
| 9 | + __DIR__ . '/../src', |
|
| 10 | + __DIR__ . '/../vendor/symfony/process', |
|
| 11 | + __DIR__ . '/../vendor/symfony/console', |
|
| 12 | + __DIR__ . '/../vendor/henrikbjorn/lurker/src', |
|
| 13 | 13 | ] |
| 14 | 14 | ]); |
@@ -24,32 +24,32 @@ discard block |
||
| 24 | 24 | { |
| 25 | 25 | $this->assertEquals( |
| 26 | 26 | $this->adjustQuotes("gulp 'default'"), |
| 27 | - (new \Robo\Task\Gulp\Run('default','gulp'))->getCommand() |
|
| 27 | + (new \Robo\Task\Gulp\Run('default', 'gulp'))->getCommand() |
|
| 28 | 28 | ); |
| 29 | 29 | |
| 30 | 30 | $this->assertEquals( |
| 31 | 31 | $this->adjustQuotes("gulp 'another'"), |
| 32 | - (new \Robo\Task\Gulp\Run('another','gulp'))->getCommand() |
|
| 32 | + (new \Robo\Task\Gulp\Run('another', 'gulp'))->getCommand() |
|
| 33 | 33 | ); |
| 34 | 34 | |
| 35 | 35 | $this->assertEquals( |
| 36 | 36 | $this->adjustQuotes("gulp 'default' --silent"), |
| 37 | - (new \Robo\Task\Gulp\Run('default','gulp'))->silent()->getCommand() |
|
| 37 | + (new \Robo\Task\Gulp\Run('default', 'gulp'))->silent()->getCommand() |
|
| 38 | 38 | ); |
| 39 | 39 | |
| 40 | 40 | $this->assertEquals( |
| 41 | 41 | $this->adjustQuotes("gulp 'default' --no-color"), |
| 42 | - (new \Robo\Task\Gulp\Run('default','gulp'))->noColor()->getCommand() |
|
| 42 | + (new \Robo\Task\Gulp\Run('default', 'gulp'))->noColor()->getCommand() |
|
| 43 | 43 | ); |
| 44 | 44 | |
| 45 | 45 | $this->assertEquals( |
| 46 | 46 | $this->adjustQuotes("gulp 'default' --color"), |
| 47 | - (new \Robo\Task\Gulp\Run('default','gulp'))->color()->getCommand() |
|
| 47 | + (new \Robo\Task\Gulp\Run('default', 'gulp'))->color()->getCommand() |
|
| 48 | 48 | ); |
| 49 | 49 | |
| 50 | 50 | $this->assertEquals( |
| 51 | 51 | $this->adjustQuotes("gulp 'default' --tasks-simple"), |
| 52 | - (new \Robo\Task\Gulp\Run('default','gulp'))->simple()->getCommand() |
|
| 52 | + (new \Robo\Task\Gulp\Run('default', 'gulp'))->simple()->getCommand() |
|
| 53 | 53 | ); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | { |
| 58 | 58 | $gulp = test::double('Robo\Task\Gulp\Run', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
| 59 | 59 | |
| 60 | - $task = (new \Robo\Task\Gulp\Run('default','gulp'))->simple(); |
|
| 60 | + $task = (new \Robo\Task\Gulp\Run('default', 'gulp'))->simple(); |
|
| 61 | 61 | $this->assertEquals( |
| 62 | 62 | $this->adjustQuotes("gulp 'default' --tasks-simple"), |
| 63 | 63 | $task->getCommand()); |
@@ -69,12 +69,11 @@ discard block |
||
| 69 | 69 | { |
| 70 | 70 | $isWindows = defined('PHP_WINDOWS_VERSION_MAJOR'); |
| 71 | 71 | $expected = $isWindows ? |
| 72 | - 'gulp "anotherWith weired!(\"\') Chars"' : |
|
| 73 | - "gulp 'anotherWith weired!(\"'\\'') Chars'"; |
|
| 72 | + 'gulp "anotherWith weired!(\"\') Chars"' : "gulp 'anotherWith weired!(\"'\\'') Chars'"; |
|
| 74 | 73 | |
| 75 | 74 | $this->assertEquals( |
| 76 | 75 | $expected, |
| 77 | - (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars','gulp'))->getCommand() |
|
| 76 | + (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars', 'gulp'))->getCommand() |
|
| 78 | 77 | ); |
| 79 | 78 | } |
| 80 | 79 | } |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | // variables are present. |
| 54 | 54 | $task = $I->taskExec('env | wc -l')->interactive(false); |
| 55 | 55 | $result = $task->run(); |
| 56 | - $start_count = (int) $result->getMessage(); |
|
| 56 | + $start_count = (int)$result->getMessage(); |
|
| 57 | 57 | $I->assertGreaterThan(0, $start_count); |
| 58 | 58 | |
| 59 | 59 | // Verify that we get the same amount of environment variables with |
@@ -62,13 +62,13 @@ discard block |
||
| 62 | 62 | $result = $task->run(); |
| 63 | 63 | $I->assertEquals( |
| 64 | 64 | $start_count, |
| 65 | - (int) $result->getMessage()); |
|
| 65 | + (int)$result->getMessage()); |
|
| 66 | 66 | |
| 67 | 67 | // Now run the same command, but this time add another environment |
| 68 | 68 | // variable, and see if our count increases by one. |
| 69 | 69 | $task = $I->taskExec('env | wc -l')->interactive(false); |
| 70 | 70 | $task->env('FOO', 'BAR'); |
| 71 | 71 | $result = $task->run(); |
| 72 | - $I->assertEquals($start_count + 1, (int) $result->getMessage()); |
|
| 72 | + $I->assertEquals($start_count + 1, (int)$result->getMessage()); |
|
| 73 | 73 | } |
| 74 | 74 | } |