From 5146185517e6cb1f356b87187cd35b87b3dd7353 Mon Sep 17 00:00:00 2001 From: Nicolas Le Goff Date: Tue, 11 Jun 2013 20:09:30 +0200 Subject: [PATCH] Add behat help --- bin/developer | 2 + .../Phrasea/Command/Developer/Behat.php | 41 +++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 lib/Alchemy/Phrasea/Command/Developer/Behat.php diff --git a/bin/developer b/bin/developer index 94126f12f8..5e33b84c54 100755 --- a/bin/developer +++ b/bin/developer @@ -14,6 +14,7 @@ use Alchemy\Phrasea\Core\Version; use Alchemy\Phrasea\Command\Developer\RegenerateSqliteDb; use Alchemy\Phrasea\Command\Developer\RoutesDumper; use Alchemy\Phrasea\Command\Developer\APIRoutesDumper; +use Alchemy\Phrasea\Command\Developer\Behat; use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper; use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper; @@ -64,6 +65,7 @@ try { $cli->command(new RegenerateSqliteDb()); $cli->command(new APIRoutesDumper()); $cli->command(new RoutesDumper()); + $cli->command(new Behat()); $cli['console']->addCommands(array( // DBAL Commands diff --git a/lib/Alchemy/Phrasea/Command/Developer/Behat.php b/lib/Alchemy/Phrasea/Command/Developer/Behat.php new file mode 100644 index 0000000000..24f712e7ee --- /dev/null +++ b/lib/Alchemy/Phrasea/Command/Developer/Behat.php @@ -0,0 +1,41 @@ +writeln('To run behat test you must first get selenium :'); + $output->writeln('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(''.$cmd.''); + } +}