mirror of
https://github.com/hauke68/Magallanes.git
synced 2025-09-13 20:50:18 +02:00
[Nostromo] PSR-2
This commit is contained in:
parent
d8cd3b4058
commit
f472084829
@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Mage\Tests\Command\BuiltIn;
|
namespace Mage\Tests\Command\BuiltIn;
|
||||||
|
|
||||||
|
|
||||||
use Mage\Command\BuiltIn\DeployCommand;
|
use Mage\Command\BuiltIn\DeployCommand;
|
||||||
use Mage\Command\AbstractCommand;
|
use Mage\Command\AbstractCommand;
|
||||||
use Mage\Tests\MageTestApplication;
|
use Mage\Tests\MageTestApplication;
|
||||||
@ -17,66 +16,66 @@ class DeployCommandTest extends TestCase
|
|||||||
$application->add(new DeployCommand());
|
$application->add(new DeployCommand());
|
||||||
|
|
||||||
$runtime = new RuntimeMockup();
|
$runtime = new RuntimeMockup();
|
||||||
$runtime->setConfiguration(array (
|
$runtime->setConfiguration(array(
|
||||||
'environments' =>
|
'environments' =>
|
||||||
array (
|
array(
|
||||||
'test' =>
|
'test' =>
|
||||||
array (
|
array(
|
||||||
'user' => 'tester',
|
'user' => 'tester',
|
||||||
'branch' => 'test',
|
'branch' => 'test',
|
||||||
'host_path' => '/var/www/test',
|
'host_path' => '/var/www/test',
|
||||||
'releases' => 4,
|
'releases' => 4,
|
||||||
'exclude' =>
|
'exclude' =>
|
||||||
array (
|
array(
|
||||||
0 => 'vendor',
|
0 => 'vendor',
|
||||||
1 => 'app/cache',
|
1 => 'app/cache',
|
||||||
2 => 'app/log',
|
2 => 'app/log',
|
||||||
3 => 'web/app_dev.php',
|
3 => 'web/app_dev.php',
|
||||||
),
|
),
|
||||||
'hosts' =>
|
'hosts' =>
|
||||||
array (
|
array(
|
||||||
0 => 'testhost',
|
0 => 'testhost',
|
||||||
),
|
),
|
||||||
'pre-deploy' =>
|
'pre-deploy' =>
|
||||||
array (
|
array(
|
||||||
0 => 'git/update',
|
0 => 'git/update',
|
||||||
1 => 'composer/install',
|
1 => 'composer/install',
|
||||||
2 => 'composer/generate-autoload',
|
2 => 'composer/generate-autoload',
|
||||||
),
|
),
|
||||||
'on-deploy' =>
|
'on-deploy' =>
|
||||||
array (
|
array(
|
||||||
0 =>
|
0 =>
|
||||||
array (
|
array(
|
||||||
'symfony/cache-clear' =>
|
'symfony/cache-clear' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
1 =>
|
1 =>
|
||||||
array (
|
array(
|
||||||
'symfony/cache-warmup' =>
|
'symfony/cache-warmup' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
2 =>
|
2 =>
|
||||||
array (
|
array(
|
||||||
'symfony/assets-install' =>
|
'symfony/assets-install' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
3 =>
|
3 =>
|
||||||
array (
|
array(
|
||||||
'symfony/assetic-dump' =>
|
'symfony/assetic-dump' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'on-release' => NULL,
|
'on-release' => null,
|
||||||
'post-release' => NULL,
|
'post-release' => null,
|
||||||
'post-deploy' => NULL,
|
'post-deploy' => null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -93,7 +92,7 @@ class DeployCommandTest extends TestCase
|
|||||||
|
|
||||||
$ranCommands = $runtime->getRanCommands();
|
$ranCommands = $runtime->getRanCommands();
|
||||||
|
|
||||||
$testCase = array (
|
$testCase = array(
|
||||||
0 => 'git branch | grep "*"',
|
0 => 'git branch | grep "*"',
|
||||||
1 => 'git checkout test',
|
1 => 'git checkout test',
|
||||||
2 => 'git pull',
|
2 => 'git pull',
|
||||||
@ -133,65 +132,65 @@ class DeployCommandTest extends TestCase
|
|||||||
$application->add(new DeployCommand());
|
$application->add(new DeployCommand());
|
||||||
|
|
||||||
$runtime = new RuntimeMockup();
|
$runtime = new RuntimeMockup();
|
||||||
$runtime->setConfiguration(array (
|
$runtime->setConfiguration(array(
|
||||||
'environments' =>
|
'environments' =>
|
||||||
array (
|
array(
|
||||||
'test' =>
|
'test' =>
|
||||||
array (
|
array(
|
||||||
'user' => 'tester',
|
'user' => 'tester',
|
||||||
'branch' => 'test',
|
'branch' => 'test',
|
||||||
'host_path' => '/var/www/test',
|
'host_path' => '/var/www/test',
|
||||||
'exclude' =>
|
'exclude' =>
|
||||||
array (
|
array(
|
||||||
0 => 'vendor',
|
0 => 'vendor',
|
||||||
1 => 'app/cache',
|
1 => 'app/cache',
|
||||||
2 => 'app/log',
|
2 => 'app/log',
|
||||||
3 => 'web/app_dev.php',
|
3 => 'web/app_dev.php',
|
||||||
),
|
),
|
||||||
'hosts' =>
|
'hosts' =>
|
||||||
array (
|
array(
|
||||||
0 => 'testhost',
|
0 => 'testhost',
|
||||||
),
|
),
|
||||||
'pre-deploy' =>
|
'pre-deploy' =>
|
||||||
array (
|
array(
|
||||||
0 => 'git/update',
|
0 => 'git/update',
|
||||||
1 => 'composer/install',
|
1 => 'composer/install',
|
||||||
2 => 'composer/generate-autoload',
|
2 => 'composer/generate-autoload',
|
||||||
),
|
),
|
||||||
'on-deploy' =>
|
'on-deploy' =>
|
||||||
array (
|
array(
|
||||||
0 =>
|
0 =>
|
||||||
array (
|
array(
|
||||||
'symfony/cache-clear' =>
|
'symfony/cache-clear' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
1 =>
|
1 =>
|
||||||
array (
|
array(
|
||||||
'symfony/cache-warmup' =>
|
'symfony/cache-warmup' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
2 =>
|
2 =>
|
||||||
array (
|
array(
|
||||||
'symfony/assets-install' =>
|
'symfony/assets-install' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
3 =>
|
3 =>
|
||||||
array (
|
array(
|
||||||
'symfony/assetic-dump' =>
|
'symfony/assetic-dump' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'on-release' => NULL,
|
'on-release' => null,
|
||||||
'post-release' => NULL,
|
'post-release' => null,
|
||||||
'post-deploy' => NULL,
|
'post-deploy' => null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -208,7 +207,7 @@ class DeployCommandTest extends TestCase
|
|||||||
|
|
||||||
$ranCommands = $runtime->getRanCommands();
|
$ranCommands = $runtime->getRanCommands();
|
||||||
|
|
||||||
$testCase = array (
|
$testCase = array(
|
||||||
0 => 'git branch | grep "*"',
|
0 => 'git branch | grep "*"',
|
||||||
1 => 'git checkout test',
|
1 => 'git checkout test',
|
||||||
2 => 'git pull',
|
2 => 'git pull',
|
||||||
@ -230,4 +229,4 @@ class DeployCommandTest extends TestCase
|
|||||||
$this->assertEquals($ranCommands[$index], $command);
|
$this->assertEquals($ranCommands[$index], $command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,66 +16,66 @@ class ListCommandTest extends TestCase
|
|||||||
$application->add(new ListCommand());
|
$application->add(new ListCommand());
|
||||||
|
|
||||||
$runtime = new RuntimeMockup();
|
$runtime = new RuntimeMockup();
|
||||||
$runtime->setConfiguration(array (
|
$runtime->setConfiguration(array(
|
||||||
'environments' =>
|
'environments' =>
|
||||||
array (
|
array(
|
||||||
'test' =>
|
'test' =>
|
||||||
array (
|
array(
|
||||||
'user' => 'tester',
|
'user' => 'tester',
|
||||||
'branch' => 'test',
|
'branch' => 'test',
|
||||||
'host_path' => '/var/www/test',
|
'host_path' => '/var/www/test',
|
||||||
'releases' => 4,
|
'releases' => 4,
|
||||||
'exclude' =>
|
'exclude' =>
|
||||||
array (
|
array(
|
||||||
0 => 'vendor',
|
0 => 'vendor',
|
||||||
1 => 'app/cache',
|
1 => 'app/cache',
|
||||||
2 => 'app/log',
|
2 => 'app/log',
|
||||||
3 => 'web/app_dev.php',
|
3 => 'web/app_dev.php',
|
||||||
),
|
),
|
||||||
'hosts' =>
|
'hosts' =>
|
||||||
array (
|
array(
|
||||||
0 => 'testhost',
|
0 => 'testhost',
|
||||||
),
|
),
|
||||||
'pre-deploy' =>
|
'pre-deploy' =>
|
||||||
array (
|
array(
|
||||||
0 => 'git/update',
|
0 => 'git/update',
|
||||||
1 => 'composer/install',
|
1 => 'composer/install',
|
||||||
2 => 'composer/generate-autoload',
|
2 => 'composer/generate-autoload',
|
||||||
),
|
),
|
||||||
'on-deploy' =>
|
'on-deploy' =>
|
||||||
array (
|
array(
|
||||||
0 =>
|
0 =>
|
||||||
array (
|
array(
|
||||||
'symfony/cache-clear' =>
|
'symfony/cache-clear' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
1 =>
|
1 =>
|
||||||
array (
|
array(
|
||||||
'symfony/cache-warmup' =>
|
'symfony/cache-warmup' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
2 =>
|
2 =>
|
||||||
array (
|
array(
|
||||||
'symfony/assets-install' =>
|
'symfony/assets-install' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
3 =>
|
3 =>
|
||||||
array (
|
array(
|
||||||
'symfony/assetic-dump' =>
|
'symfony/assetic-dump' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'on-release' => NULL,
|
'on-release' => null,
|
||||||
'post-release' => NULL,
|
'post-release' => null,
|
||||||
'post-deploy' => NULL,
|
'post-deploy' => null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -90,7 +90,7 @@ class ListCommandTest extends TestCase
|
|||||||
|
|
||||||
$ranCommands = $runtime->getRanCommands();
|
$ranCommands = $runtime->getRanCommands();
|
||||||
|
|
||||||
$testCase = array (
|
$testCase = array(
|
||||||
0 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost sh -c \\"ls -1 /var/www/test/releases\\"',
|
0 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost sh -c \\"ls -1 /var/www/test/releases\\"',
|
||||||
1 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost sh -c \\"readlink -f /var/www/test/current\\"',
|
1 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost sh -c \\"readlink -f /var/www/test/current\\"',
|
||||||
);
|
);
|
||||||
@ -103,5 +103,4 @@ class ListCommandTest extends TestCase
|
|||||||
$this->assertEquals($ranCommands[$index], $command);
|
$this->assertEquals($ranCommands[$index], $command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
@ -16,66 +16,66 @@ class RollbackCommandTest extends TestCase
|
|||||||
$application->add(new RollbackCommand());
|
$application->add(new RollbackCommand());
|
||||||
|
|
||||||
$runtime = new RuntimeMockup();
|
$runtime = new RuntimeMockup();
|
||||||
$runtime->setConfiguration(array (
|
$runtime->setConfiguration(array(
|
||||||
'environments' =>
|
'environments' =>
|
||||||
array (
|
array(
|
||||||
'test' =>
|
'test' =>
|
||||||
array (
|
array(
|
||||||
'user' => 'tester',
|
'user' => 'tester',
|
||||||
'branch' => 'test',
|
'branch' => 'test',
|
||||||
'host_path' => '/var/www/test',
|
'host_path' => '/var/www/test',
|
||||||
'releases' => 4,
|
'releases' => 4,
|
||||||
'exclude' =>
|
'exclude' =>
|
||||||
array (
|
array(
|
||||||
0 => 'vendor',
|
0 => 'vendor',
|
||||||
1 => 'app/cache',
|
1 => 'app/cache',
|
||||||
2 => 'app/log',
|
2 => 'app/log',
|
||||||
3 => 'web/app_dev.php',
|
3 => 'web/app_dev.php',
|
||||||
),
|
),
|
||||||
'hosts' =>
|
'hosts' =>
|
||||||
array (
|
array(
|
||||||
0 => 'testhost',
|
0 => 'testhost',
|
||||||
),
|
),
|
||||||
'pre-deploy' =>
|
'pre-deploy' =>
|
||||||
array (
|
array(
|
||||||
0 => 'git/update',
|
0 => 'git/update',
|
||||||
1 => 'composer/install',
|
1 => 'composer/install',
|
||||||
2 => 'composer/generate-autoload',
|
2 => 'composer/generate-autoload',
|
||||||
),
|
),
|
||||||
'on-deploy' =>
|
'on-deploy' =>
|
||||||
array (
|
array(
|
||||||
0 =>
|
0 =>
|
||||||
array (
|
array(
|
||||||
'symfony/cache-clear' =>
|
'symfony/cache-clear' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
1 =>
|
1 =>
|
||||||
array (
|
array(
|
||||||
'symfony/cache-warmup' =>
|
'symfony/cache-warmup' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
2 =>
|
2 =>
|
||||||
array (
|
array(
|
||||||
'symfony/assets-install' =>
|
'symfony/assets-install' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
3 =>
|
3 =>
|
||||||
array (
|
array(
|
||||||
'symfony/assetic-dump' =>
|
'symfony/assetic-dump' =>
|
||||||
array (
|
array(
|
||||||
'env' => 'dev',
|
'env' => 'dev',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
'on-release' => NULL,
|
'on-release' => null,
|
||||||
'post-release' => NULL,
|
'post-release' => null,
|
||||||
'post-deploy' => NULL,
|
'post-deploy' => null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -90,7 +90,7 @@ class RollbackCommandTest extends TestCase
|
|||||||
|
|
||||||
$ranCommands = $runtime->getRanCommands();
|
$ranCommands = $runtime->getRanCommands();
|
||||||
|
|
||||||
$testCase = array (
|
$testCase = array(
|
||||||
0 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost sh -c \\"ls -1 /var/www/test/releases\\"',
|
0 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost sh -c \\"ls -1 /var/www/test/releases\\"',
|
||||||
1 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost sh -c \\"cd /var/www/test \\&\\& ln -snf releases/20170101015115 current\\"',
|
1 => 'ssh -p 22 -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no tester@testhost sh -c \\"cd /var/www/test \\&\\& ln -snf releases/20170101015115 current\\"',
|
||||||
);
|
);
|
||||||
@ -103,5 +103,4 @@ class RollbackCommandTest extends TestCase
|
|||||||
$this->assertEquals($ranCommands[$index], $command);
|
$this->assertEquals($ranCommands[$index], $command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace Mage\Tests\Command\BuiltIn;
|
namespace Mage\Tests\Command\BuiltIn;
|
||||||
|
|
||||||
|
|
||||||
use Mage\Command\BuiltIn\VersionCommand;
|
use Mage\Command\BuiltIn\VersionCommand;
|
||||||
use Mage\Command\AbstractCommand;
|
use Mage\Command\AbstractCommand;
|
||||||
use Mage\Tests\MageTestApplication;
|
use Mage\Tests\MageTestApplication;
|
||||||
@ -27,4 +26,4 @@ class VersionCommandTest extends TestCase
|
|||||||
$output = trim($tester->getDisplay());
|
$output = trim($tester->getDisplay());
|
||||||
$this->assertEquals(sprintf('Magallanes v%s [%s]', Mage::VERSION, Mage::CODENAME), $output);
|
$this->assertEquals(sprintf('Magallanes v%s [%s]', Mage::VERSION, Mage::CODENAME), $output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,6 @@ class ProcessMockup extends Process
|
|||||||
|
|
||||||
public function run($callback = null)
|
public function run($callback = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isSuccessful()
|
public function isSuccessful()
|
||||||
@ -49,4 +48,4 @@ class ProcessMockup extends Process
|
|||||||
|
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,4 +51,4 @@ class RuntimeMockup extends Runtime
|
|||||||
{
|
{
|
||||||
return '/tmp/mageXYZ';
|
return '/tmp/mageXYZ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user