forked from Codeception/Codeception
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codecept
executable file
·39 lines (34 loc) · 1.45 KB
/
codecept
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env php
<?php
/**
* Codeception CLI
*/
if (!class_exists('UniversalClassLoader')) {
$bootstrap_folder = (is_dir(__DIR__ . '/src'))
? dirname(__FILE__)
: 'Codeception';
require_once $bootstrap_folder.'/autoload.php';
}
if (isset($argv[1])) {
if (!in_array('run', $argv) && ($version = \Codeception\Codecept::checkLastVersion())) {
if (version_compare($version, \Codeception\Codecept::VERSION) > 0) {
echo "UPDATE: version $version released. See changes on: http://codeception.com .\n\n";
}
}
}
use Symfony\Component\Console\Application,
Symfony\Component\Console\Input\InputInterface,
Symfony\Component\Console\Input\InputDefinition,
Symfony\Component\Console\Input\InputOption;
$app = new Application('Codeception', Codeception\Codecept::VERSION);
$app->add(new Codeception\Command\Build('build'));
$app->add(new Codeception\Command\Run('run'));
$app->add(new Codeception\Command\Analyze('analyze'));
$app->add(new Codeception\Command\Bootstrap('bootstrap'));
$app->add(new Codeception\Command\GenerateCept('generate:cept'));
$app->add(new Codeception\Command\GenerateCest('generate:cest'));
$app->add(new Codeception\Command\GenerateTest('generate:test'));
$app->add(new Codeception\Command\GeneratePhpUnit('generate:phpunit'));
$app->add(new Codeception\Command\GenerateSuite('generate:suite'));
$app->add(new Codeception\Command\GenerateScenarios('generate:scenarios'));
$app->run();