-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtests.php
More file actions
34 lines (28 loc) · 774 Bytes
/
tests.php
File metadata and controls
34 lines (28 loc) · 774 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
#!/usr/bin/env php
<?php
foreach (array(
'mandango:generate',
'doctrine:database:drop --env=test --force',
'doctrine:database:create --env=test',
'doctrine:schema:update --env=test --force',
) as $command) {
system('php '.__DIR__.'/TestsProject/app/console '.$command);
}
require_once(__DIR__.'/vendor/symfony/src/Symfony/Component/Process/Process.php');
use Symfony\Component\Process\Process;
$commands = array(
'phpunit -c TestsProject/app/',
);
$fail = false;
foreach ($commands as $command) {
$process = new Process($command);
$process->run(function ($type, $data) {
if ('out' === $type) {
echo $data;
}
});
if (0 !== $process->getExitCode()) {
$fail = true;
}
}
exit($fail ? 1 : 0);