mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00
Add behat help
This commit is contained in:
@@ -14,6 +14,7 @@ use Alchemy\Phrasea\Core\Version;
|
|||||||
use Alchemy\Phrasea\Command\Developer\RegenerateSqliteDb;
|
use Alchemy\Phrasea\Command\Developer\RegenerateSqliteDb;
|
||||||
use Alchemy\Phrasea\Command\Developer\RoutesDumper;
|
use Alchemy\Phrasea\Command\Developer\RoutesDumper;
|
||||||
use Alchemy\Phrasea\Command\Developer\APIRoutesDumper;
|
use Alchemy\Phrasea\Command\Developer\APIRoutesDumper;
|
||||||
|
use Alchemy\Phrasea\Command\Developer\Behat;
|
||||||
|
|
||||||
use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper;
|
use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper;
|
||||||
use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper;
|
use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper;
|
||||||
@@ -64,6 +65,7 @@ try {
|
|||||||
$cli->command(new RegenerateSqliteDb());
|
$cli->command(new RegenerateSqliteDb());
|
||||||
$cli->command(new APIRoutesDumper());
|
$cli->command(new APIRoutesDumper());
|
||||||
$cli->command(new RoutesDumper());
|
$cli->command(new RoutesDumper());
|
||||||
|
$cli->command(new Behat());
|
||||||
|
|
||||||
$cli['console']->addCommands(array(
|
$cli['console']->addCommands(array(
|
||||||
// DBAL Commands
|
// DBAL Commands
|
||||||
|
41
lib/Alchemy/Phrasea/Command/Developer/Behat.php
Normal file
41
lib/Alchemy/Phrasea/Command/Developer/Behat.php
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Phraseanet
|
||||||
|
*
|
||||||
|
* (c) 2005-2013 Alchemy
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view the LICENSE
|
||||||
|
* file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Alchemy\Phrasea\Command\Developer;
|
||||||
|
|
||||||
|
use Alchemy\Phrasea\Command\Command;
|
||||||
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
use Symfony\Component\Filesystem\Filesystem;
|
||||||
|
|
||||||
|
class Behat extends Command
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct('behat:help');
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||||
|
{
|
||||||
|
$fs = new Filesystem();
|
||||||
|
|
||||||
|
$output->writeln('To run behat test you must first get selenium :');
|
||||||
|
$output->writeln('<info>http://selenium.googlecode.com/files/selenium-server-standalone-2.31.0.jar');
|
||||||
|
$output->writeln('and run it with the following command "java -jar selenium-server-standalone-2.31.0.jar > /dev/null &"');
|
||||||
|
$output->writeln('Then you must run the following command :');
|
||||||
|
|
||||||
|
$relativePath = $fs->makePathRelative(getcwd(), $this->container['root.path'] . '/behat.yml');
|
||||||
|
|
||||||
|
$cmd = sprintf('cp %sbehat.yml.dist %sbehat.yml', $relativePath, $relativePath);
|
||||||
|
|
||||||
|
$output->writeln('<info>'.$cmd.'</info>');
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user