mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-22 16:27:39 +01:00
Improve tests
This commit is contained in:
parent
ff06e8a26a
commit
90db1c16d2
@ -9,6 +9,7 @@ namespace Deployer;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Console\Application;
|
||||
use Symfony\Component\Console\Output\Output;
|
||||
use Symfony\Component\Console\Tester\ApplicationTester;
|
||||
|
||||
abstract class AbstractTest extends TestCase
|
||||
@ -52,4 +53,18 @@ abstract class AbstractTest extends TestCase
|
||||
$this->deployer->init();
|
||||
$this->deployer->config->set('deploy_path', __TEMP_DIR__ . '/{{hostname}}');
|
||||
}
|
||||
|
||||
protected function dep(string $recipe, string $task)
|
||||
{
|
||||
$this->init($recipe);
|
||||
$this->tester->run([
|
||||
$task,
|
||||
'selector' => 'all',
|
||||
'-f' => $recipe,
|
||||
'-l' => 1
|
||||
], [
|
||||
'verbosity' => Output::VERBOSITY_VERBOSE,
|
||||
'interactive' => false,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user