| Total Complexity | 2 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class OnFuncTest extends JoyTest |
||
| 12 | { |
||
| 13 | protected function recipe(): string |
||
| 16 | <?php |
||
| 17 | namespace Deployer; |
||
| 18 | localhost('prod'); |
||
| 19 | localhost('beta'); |
||
| 20 | |||
| 21 | task('test', [ |
||
| 22 | 'first', |
||
| 23 | 'second', |
||
| 24 | ]); |
||
| 25 | |||
| 26 | task('first', function () { |
||
| 27 | set('foo', '{{alias}}'); |
||
| 28 | }); |
||
| 29 | |||
| 30 | task('second', function () { |
||
| 31 | on(selectedHosts(), function () { |
||
| 32 | writeln('foo = {{foo}}'); |
||
| 33 | }); |
||
| 34 | })->once(); |
||
| 35 | PHP; |
||
| 36 | } |
||
| 37 | |||
| 38 | public function testOnFunc() |
||
| 50 |