@@ 80-92 (lines=13) @@ | ||
77 | $this->assertEquals('value', $actual); |
|
78 | } |
|
79 | ||
80 | public function testWithConfigLoader() |
|
81 | { |
|
82 | $loader = new YamlConfigLoader(); |
|
83 | $loader->load(dirname(__DIR__) . '/_data/robo.yml'); |
|
84 | ||
85 | \Robo\Robo::config()->import($loader->export()); |
|
86 | ||
87 | $argv = ['placeholder', 'test:simple-list']; |
|
88 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
89 | ||
90 | $this->guy->seeInOutput("a: '12'"); |
|
91 | $this->guy->seeInOutput("b: '13'"); |
|
92 | } |
|
93 | ||
94 | public function testWithConfigLoaderAndCliOverride() |
|
95 | { |
|
@@ 94-106 (lines=13) @@ | ||
91 | $this->guy->seeInOutput("b: '13'"); |
|
92 | } |
|
93 | ||
94 | public function testWithConfigLoaderAndCliOverride() |
|
95 | { |
|
96 | $loader = new YamlConfigLoader(); |
|
97 | $loader->load(dirname(__DIR__) . '/_data/robo.yml'); |
|
98 | ||
99 | \Robo\Robo::config()->import($loader->export()); |
|
100 | ||
101 | $argv = ['placeholder', 'test:simple-list', '--b=3']; |
|
102 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
103 | ||
104 | $this->guy->seeInOutput("a: '12'"); |
|
105 | $this->guy->seeInOutput("b: '3'"); |
|
106 | } |
|
107 | ||
108 | public function testWithConfigProcessor() |
|
109 | { |
|
@@ 123-135 (lines=13) @@ | ||
120 | $this->guy->seeInOutput("b: '13'"); |
|
121 | } |
|
122 | ||
123 | public function testCommandWithTaskConfiguration() |
|
124 | { |
|
125 | $loader = new YamlConfigLoader(); |
|
126 | $loader->load(dirname(__DIR__) . '/_data/robo.yml'); |
|
127 | ||
128 | \Robo\Robo::config()->import($loader->export()); |
|
129 | ||
130 | $argv = ['placeholder', 'test:exec', '--simulate']; |
|
131 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
132 | ||
133 | // `task.Exec.settings.dir` is defined in loaded robo.yml configuration file. |
|
134 | $this->guy->seeInOutput("->dir('/some/dir')"); |
|
135 | } |
|
136 | } |
|
137 |