Skip to content

Commit

Permalink
Remove most of old test (we still need to migrate some assertions)
Browse files Browse the repository at this point in the history
  • Loading branch information
loevgaard committed Oct 3, 2024
1 parent 14c08a9 commit 8d20960
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 109 deletions.
50 changes: 0 additions & 50 deletions tests/recipe/DeployTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,61 +4,11 @@

namespace Setono\Deployer\DotEnv\recipe;

use Deployer\Console\Application;
use Deployer\Deployer;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Tester\ApplicationTester;

final class DeployTest extends TestCase
{
private ApplicationTester $tester;

private Deployer $deployer;

public static function setUpBeforeClass(): void
{
set_include_path(get_include_path() . \PATH_SEPARATOR . __DIR__ . '/../../vendor/deployer/deployer');

// init repository
$repository = __DIR__ . '/repository';

exec("cd $repository && git init");
exec("cd $repository && git add .");
exec("cd $repository && git config user.name 'Joachim Løvgaard'");
exec("cd $repository && git config user.email '[email protected]'");
exec("cd $repository && git commit -m 'first commit'");
}

protected function setUp(): void
{
// init deployer and application tester0
$console = new Application();
$console->setAutoExit(false);
$this->tester = new ApplicationTester($console);

$this->deployer = new Deployer($console);
Deployer::loadRecipe(__DIR__ . '/deploy.php');
$this->deployer->init();
}

protected function tearDown(): void
{
foreach ($this->deployer->hosts as $host) {
$deployPath = $host->get('deploy_path');
exec("rm -rf $deployPath");
}
}

public static function tearDownAfterClass(): void
{
$git = __DIR__ . '/repository/.git';
exec("rm -rf $git");
}

/**
* @test
*/
public function it_deploys(): void
{
$this->tester->run([
Expand Down
44 changes: 0 additions & 44 deletions tests/recipe/deploy.php

This file was deleted.

5 changes: 0 additions & 5 deletions tests/recipe/repository/.env

This file was deleted.

1 change: 0 additions & 1 deletion tests/recipe/repository/README.md

This file was deleted.

9 changes: 0 additions & 9 deletions tests/recipe/repository/composer.json

This file was deleted.

0 comments on commit 8d20960

Please sign in to comment.