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