|
@@ 113-125 (lines=13) @@
|
| 110 |
|
$this->assertEquals('value', $actual); |
| 111 |
|
} |
| 112 |
|
|
| 113 |
|
public function testWithConfigLoader() |
| 114 |
|
{ |
| 115 |
|
$loader = new YamlConfigLoader(); |
| 116 |
|
$loader->load(dirname(__DIR__) . '/_data/robo.yml'); |
| 117 |
|
|
| 118 |
|
\Robo\Robo::config()->import($loader->export()); |
| 119 |
|
|
| 120 |
|
$argv = ['placeholder', 'test:simple-list']; |
| 121 |
|
$result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
| 122 |
|
|
| 123 |
|
$this->guy->seeInOutput("a: '12'"); |
| 124 |
|
$this->guy->seeInOutput("b: '13'"); |
| 125 |
|
} |
| 126 |
|
|
| 127 |
|
public function testWithConfigLoaderAndCliOverride() |
| 128 |
|
{ |
|
@@ 127-139 (lines=13) @@
|
| 124 |
|
$this->guy->seeInOutput("b: '13'"); |
| 125 |
|
} |
| 126 |
|
|
| 127 |
|
public function testWithConfigLoaderAndCliOverride() |
| 128 |
|
{ |
| 129 |
|
$loader = new YamlConfigLoader(); |
| 130 |
|
$loader->load(dirname(__DIR__) . '/_data/robo.yml'); |
| 131 |
|
|
| 132 |
|
\Robo\Robo::config()->import($loader->export()); |
| 133 |
|
|
| 134 |
|
$argv = ['placeholder', 'test:simple-list', '--b=3']; |
| 135 |
|
$result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
| 136 |
|
|
| 137 |
|
$this->guy->seeInOutput("a: '12'"); |
| 138 |
|
$this->guy->seeInOutput("b: '3'"); |
| 139 |
|
} |
| 140 |
|
|
| 141 |
|
public function testWithConfigProcessor() |
| 142 |
|
{ |
|
@@ 156-168 (lines=13) @@
|
| 153 |
|
$this->guy->seeInOutput("b: '13'"); |
| 154 |
|
} |
| 155 |
|
|
| 156 |
|
public function testCommandWithTaskConfiguration() |
| 157 |
|
{ |
| 158 |
|
$loader = new YamlConfigLoader(); |
| 159 |
|
$loader->load(dirname(__DIR__) . '/_data/robo.yml'); |
| 160 |
|
|
| 161 |
|
\Robo\Robo::config()->import($loader->export()); |
| 162 |
|
|
| 163 |
|
$argv = ['placeholder', 'test:exec', '--simulate']; |
| 164 |
|
$result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
| 165 |
|
|
| 166 |
|
// `task.Base.Exec.settings.dir` is defined in loaded robo.yml configuration file. |
| 167 |
|
$this->guy->seeInOutput("->dir('/some/dir')"); |
| 168 |
|
} |
| 169 |
|
|
| 170 |
|
public function testCommandWithFallbackTaskConfiguration() |
| 171 |
|
{ |
|
@@ 170-182 (lines=13) @@
|
| 167 |
|
$this->guy->seeInOutput("->dir('/some/dir')"); |
| 168 |
|
} |
| 169 |
|
|
| 170 |
|
public function testCommandWithFallbackTaskConfiguration() |
| 171 |
|
{ |
| 172 |
|
$loader = new YamlConfigLoader(); |
| 173 |
|
$loader->load(dirname(__DIR__) . '/_data/falback-task-config-robo.yml'); |
| 174 |
|
|
| 175 |
|
\Robo\Robo::config()->import($loader->export()); |
| 176 |
|
|
| 177 |
|
$argv = ['placeholder', 'test:exec', '--simulate']; |
| 178 |
|
$result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
| 179 |
|
|
| 180 |
|
// `task.Base.settings.dir` is defined in loaded robo.yml configuration file. |
| 181 |
|
$this->guy->seeInOutput("->dir('/some/other/dir')"); |
| 182 |
|
} |
| 183 |
|
} |
| 184 |
|
|