wallabag/tests/bootstrap.php

66 lines
1.4 KiB
PHP
Raw Permalink Normal View History

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