-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtendo
More file actions
executable file
·36 lines (30 loc) · 801 Bytes
/
tendo
File metadata and controls
executable file
·36 lines (30 loc) · 801 Bytes
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
#!/usr/bin/env php
<?php
use Tendo\Tendo;
if (version_compare('5.4.0', PHP_VERSION, '>')) {
echo 'Your version of PHP is outdated.' . PHP_EOL;
die(1);
}
if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}
if (!is_readable('vendor/autoload.php')) {
echo 'Composer dependecies not installed, please run "composer install".' . PHP_EOL;
}
require 'vendor/autoload.php';
if (count($argv) > 0) {
array_shift($argv);
$filenames = $argv;
} else {
echo 'Usage: ./vendor/bin/tendo <myTest.php> [myTestX.php...]' . PHP_EOL;
die(0);
}
foreach ($filenames as $filename) {
if (is_readable($filename)) {
$test = new Tendo();
$title = require 'exempleCLI.php';
$test->title($title);
$test->run();
echo PHP_EOL;
}
}