mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 09:12:51 +01:00
Add tests for invoke on groups
This commit is contained in:
parent
432b8ee9c1
commit
53fbea17b7
@ -45,6 +45,28 @@ task('test_invoke:subtask2', function () {
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
* Invoke group test
|
||||
*/
|
||||
|
||||
task('test_invoke_group', function () {
|
||||
invoke('test_invoke_group:group');
|
||||
});
|
||||
|
||||
task('test_invoke_group:group', [
|
||||
'test_invoke_group:subtask1',
|
||||
'test_invoke_group:subtask2',
|
||||
]);
|
||||
|
||||
task('test_invoke_group:subtask1', function () {
|
||||
writeln('first');
|
||||
});
|
||||
|
||||
task('test_invoke_group:subtask2', function () {
|
||||
writeln('second');
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
* Function "on" test
|
||||
*/
|
||||
|
@ -33,6 +33,13 @@ class PartyTest extends DepCase
|
||||
self::assertContains('second', $output);
|
||||
}
|
||||
|
||||
public function testInvokeGroup()
|
||||
{
|
||||
$output = $this->start('test_invoke_group');
|
||||
self::assertContains('first', $output);
|
||||
self::assertContains('second', $output);
|
||||
}
|
||||
|
||||
public function testOn()
|
||||
{
|
||||
$output = $this->start('test_on');
|
||||
|
Loading…
x
Reference in New Issue
Block a user