2024-01-07 21:12:29 +00:00
|
|
|
<?php
|
|
|
|
|
2024-01-07 21:15:55 +00:00
|
|
|
use Symfony\Component\Filesystem\Filesystem;
|
2024-01-07 21:29:51 +00:00
|
|
|
use Symfony\Component\Process\Process;
|
2024-01-07 21:15:55 +00:00
|
|
|
|
2024-01-07 21:12:29 +00:00
|
|
|
require __DIR__ . '/../vendor/autoload.php';
|
2024-01-07 21:15:55 +00:00
|
|
|
|
|
|
|
(new Filesystem())->remove(__DIR__ . '/../var/cache/test');
|
2024-01-07 21:29:51 +00:00
|
|
|
|
2024-01-12 20:57:18 +00:00
|
|
|
if (!isPartialRun()) {
|
|
|
|
(new Process([
|
|
|
|
'php',
|
|
|
|
__DIR__ . '/../bin/console',
|
|
|
|
'doctrine:database:drop',
|
|
|
|
'--force',
|
|
|
|
'--env=test',
|
|
|
|
]))->run(function ($type, $buffer) {
|
|
|
|
echo $buffer;
|
|
|
|
});
|
2024-01-07 21:29:51 +00:00
|
|
|
|
2024-01-12 20:57:18 +00:00
|
|
|
(new Process([
|
|
|
|
'php',
|
|
|
|
__DIR__ . '/../bin/console',
|
|
|
|
'doctrine:database:create',
|
|
|
|
'--env=test',
|
|
|
|
]))->mustRun(function ($type, $buffer) {
|
|
|
|
echo $buffer;
|
|
|
|
});
|
2024-01-07 21:29:51 +00:00
|
|
|
|
2024-01-12 20:57:18 +00:00
|
|
|
(new Process([
|
|
|
|
'php',
|
|
|
|
__DIR__ . '/../bin/console',
|
|
|
|
'doctrine:migrations:migrate',
|
|
|
|
'--no-interaction',
|
|
|
|
'--env=test',
|
|
|
|
'-vv',
|
|
|
|
]))->mustRun(function ($type, $buffer) {
|
|
|
|
echo $buffer;
|
|
|
|
});
|
|
|
|
}
|
2024-01-07 21:33:20 +00:00
|
|
|
|
|
|
|
(new Process([
|
|
|
|
'php',
|
|
|
|
__DIR__ . '/../bin/console',
|
|
|
|
'doctrine:fixtures:load',
|
|
|
|
'--no-interaction',
|
|
|
|
'--env=test',
|
2024-01-07 21:47:00 +00:00
|
|
|
]))->mustRun(function ($type, $buffer) {
|
|
|
|
echo $buffer;
|
|
|
|
});
|