@@ -1,7 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | use Robo\Common\ResourceExistenceChecker; |
| 3 | -use Robo\Result; |
|
| 4 | -use Robo\Task\BaseTask; |
|
| 5 | 3 | |
| 6 | 4 | class ResourceExistenceCheckerTest extends \Codeception\TestCase\Test |
| 7 | 5 | { |
@@ -1,6 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | use Robo\Robo; |
| 3 | -use Symfony\Component\Console\Output\BufferedOutput; |
|
| 4 | 3 | |
| 5 | 4 | class RunnerTest extends \Codeception\TestCase\Test |
| 6 | 5 | { |
@@ -145,6 +145,10 @@ |
||
| 145 | 145 | protected $key; |
| 146 | 146 | protected $value; |
| 147 | 147 | |
| 148 | + /** |
|
| 149 | + * @param string $key |
|
| 150 | + * @param string $value |
|
| 151 | + */ |
|
| 148 | 152 | public function __construct($key, $value) |
| 149 | 153 | { |
| 150 | 154 | $this->key = $key; |
@@ -8,9 +8,7 @@ |
||
| 8 | 8 | |
| 9 | 9 | use Robo\Result; |
| 10 | 10 | use Robo\Task\BaseTask; |
| 11 | -use Robo\Contract\TaskInterface; |
|
| 12 | 11 | use Robo\Collection\Collection; |
| 13 | -use Robo\Robo; |
|
| 14 | 12 | |
| 15 | 13 | class CollectionTest extends \Codeception\TestCase\Test |
| 16 | 14 | { |
@@ -103,11 +103,11 @@ |
||
| 103 | 103 | ->completion($completion1) |
| 104 | 104 | ->rollbackCode(function() use($rollback1) { $rollback1->run(); } ) |
| 105 | 105 | ->completionCode(function() use($completion1) { $completion1->run(); } ) |
| 106 | - ->addCode(function () { return 42; }) |
|
| 106 | + ->addCode(function() { return 42; }) |
|
| 107 | 107 | ->progressMessage("not reached") |
| 108 | 108 | ->rollback($rollback2) |
| 109 | 109 | ->completion($completion2) |
| 110 | - ->addCode(function () { return 13; }); |
|
| 110 | + ->addCode(function() { return 13; }); |
|
| 111 | 111 | |
| 112 | 112 | $collection->setLogger($this->guy->logger()); |
| 113 | 113 | |
@@ -16,6 +16,9 @@ |
||
| 16 | 16 | ]); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | + /** |
|
| 20 | + * @param string $expected |
|
| 21 | + */ |
|
| 19 | 22 | protected function adjustQuotes($expected) |
| 20 | 23 | { |
| 21 | 24 | $isWindows = defined('PHP_WINDOWS_VERSION_MAJOR'); |
@@ -30,27 +30,27 @@ discard block |
||
| 30 | 30 | public function testGulpGetCommand() |
| 31 | 31 | { |
| 32 | 32 | verify( |
| 33 | - (new \Robo\Task\Gulp\Run('default','gulp'))->getCommand() |
|
| 33 | + (new \Robo\Task\Gulp\Run('default', 'gulp'))->getCommand() |
|
| 34 | 34 | )->equals($this->adjustQuotes('gulp "default"')); |
| 35 | 35 | |
| 36 | 36 | verify( |
| 37 | - (new \Robo\Task\Gulp\Run('another','gulp'))->getCommand() |
|
| 37 | + (new \Robo\Task\Gulp\Run('another', 'gulp'))->getCommand() |
|
| 38 | 38 | )->equals($this->adjustQuotes('gulp "another"')); |
| 39 | 39 | |
| 40 | 40 | verify( |
| 41 | - (new \Robo\Task\Gulp\Run('default','gulp'))->silent()->getCommand() |
|
| 41 | + (new \Robo\Task\Gulp\Run('default', 'gulp'))->silent()->getCommand() |
|
| 42 | 42 | )->equals($this->adjustQuotes('gulp "default" --silent')); |
| 43 | 43 | |
| 44 | 44 | verify( |
| 45 | - (new \Robo\Task\Gulp\Run('default','gulp'))->noColor()->getCommand() |
|
| 45 | + (new \Robo\Task\Gulp\Run('default', 'gulp'))->noColor()->getCommand() |
|
| 46 | 46 | )->equals($this->adjustQuotes('gulp "default" --no-color')); |
| 47 | 47 | |
| 48 | 48 | verify( |
| 49 | - (new \Robo\Task\Gulp\Run('default','gulp'))->color()->getCommand() |
|
| 49 | + (new \Robo\Task\Gulp\Run('default', 'gulp'))->color()->getCommand() |
|
| 50 | 50 | )->equals($this->adjustQuotes('gulp "default" --color')); |
| 51 | 51 | |
| 52 | 52 | verify( |
| 53 | - (new \Robo\Task\Gulp\Run('default','gulp'))->simple()->getCommand() |
|
| 53 | + (new \Robo\Task\Gulp\Run('default', 'gulp'))->simple()->getCommand() |
|
| 54 | 54 | )->equals($this->adjustQuotes('gulp "default" --tasks-simple')); |
| 55 | 55 | } |
| 56 | 56 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | { |
| 59 | 59 | $gulp = test::double('Robo\Task\Gulp\Run', ['executeCommand' => null, 'getConfig' => new \Robo\Config(), 'logger' => new \Psr\Log\NullLogger()]); |
| 60 | 60 | |
| 61 | - $task = (new \Robo\Task\Gulp\Run('default','gulp'))->simple(); |
|
| 61 | + $task = (new \Robo\Task\Gulp\Run('default', 'gulp'))->simple(); |
|
| 62 | 62 | verify($task->getCommand())->equals($this->adjustQuotes('gulp "default" --tasks-simple')); |
| 63 | 63 | $task->run(); |
| 64 | 64 | $gulp->verifyInvoked('executeCommand', [$this->adjustQuotes('gulp "default" --tasks-simple')]); |
@@ -71,13 +71,13 @@ discard block |
||
| 71 | 71 | if ($isWindows) { |
| 72 | 72 | |
| 73 | 73 | verify( |
| 74 | - (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars','gulp'))->getCommand() |
|
| 74 | + (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars', 'gulp'))->getCommand() |
|
| 75 | 75 | )->equals('gulp "anotherWith weired!(\"\') Chars"'); |
| 76 | 76 | |
| 77 | 77 | } else { |
| 78 | 78 | |
| 79 | 79 | verify( |
| 80 | - (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars','gulp'))->getCommand() |
|
| 80 | + (new \Robo\Task\Gulp\Run('anotherWith weired!("\') Chars', 'gulp'))->getCommand() |
|
| 81 | 81 | )->equals("gulp 'anotherWith weired!(\"'\\'') Chars'"); |
| 82 | 82 | |
| 83 | 83 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | { |
| 21 | 21 | use _generated\CodeGuyActions; |
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Define custom actions here |
|
| 25 | - */ |
|
| 23 | + /** |
|
| 24 | + * Define custom actions here |
|
| 25 | + */ |
|
| 26 | 26 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | ->extensions('php') // single string value of List |
| 38 | 38 | ->exclude(array('test', 'tmp')) // array value of Traversable |
| 39 | 39 | ->skipDocPath($skippedPaths) // multi-value of Traversable |
| 40 | - ->charset(array('utf8','iso88591')) // array of List |
|
| 40 | + ->charset(array('utf8', 'iso88591')) // array of List |
|
| 41 | 41 | ->internal('no') // boolean as supported "no" |
| 42 | 42 | ->php(true) // boolean as boolean |
| 43 | 43 | ->tree('Y') // boolean as string |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | // tests |
| 22 | 22 | public function testBowerInstall() |
| 23 | 23 | { |
| 24 | - $bower = test::double('Robo\Task\Bower\Install', ['executeCommand' => null, 'logger' => new \Psr\Log\NullLogger(),]); |
|
| 24 | + $bower = test::double('Robo\Task\Bower\Install', ['executeCommand' => null, 'logger' => new \Psr\Log\NullLogger(), ]); |
|
| 25 | 25 | (new \Robo\Task\Bower\Install('bower'))->run(); |
| 26 | 26 | $bower->verifyInvoked('executeCommand', ['bower install']); |
| 27 | 27 | } |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | $message = $argv[1]; |
| 4 | 4 | $iterations = $argv[2]; |
| 5 | -for ($i=0; $i < $iterations; ++$i) { |
|
| 5 | +for ($i = 0; $i < $iterations; ++$i) { |
|
| 6 | 6 | print "$message\n"; |
| 7 | 7 | sleep(1); |
| 8 | 8 | } |
@@ -5,8 +5,8 @@ |
||
| 5 | 5 | $kernel->init([ |
| 6 | 6 | 'debug' => true, |
| 7 | 7 | 'includePaths' => [ |
| 8 | - __DIR__.'/../src', |
|
| 9 | - __DIR__.'/../vendor/symfony/process', |
|
| 10 | - __DIR__.'/../vendor/symfony/console', |
|
| 8 | + __DIR__ . '/../src', |
|
| 9 | + __DIR__ . '/../vendor/symfony/process', |
|
| 10 | + __DIR__ . '/../vendor/symfony/console', |
|
| 11 | 11 | ] |
| 12 | 12 | ]); |