Skip to content

Commit f443b9c

Browse files
committed
disable session in tests
1 parent ef4dd60 commit f443b9c

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ vendor/
55
build/
66
.phpunit
77
phpunit.xml
8+

Tests/AbstractTestCase.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@
1414
use Orbitale\Bundle\CmsBundle\Tests\Fixtures\TestBundle\Entity\Page;
1515
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
1616
use Symfony\Component\Console\Output\BufferedOutput;
17-
use Symfony\Component\Console\Output\ConsoleOutput;
18-
use Symfony\Component\Console\Output\NullOutput;
1917
use Symfony\Component\Filesystem\Filesystem;
2018
use Symfony\Bundle\FrameworkBundle\Console\Application;
2119
use Symfony\Component\Console\Input\ArrayInput;
2220

2321
class AbstractTestCase extends WebTestCase
2422
{
2523
public function setUp(): void
24+
{
25+
self::installDatabase();
26+
}
27+
28+
public static function installDatabase(): void
2629
{
2730
static::bootKernel();
2831

Tests/Fixtures/App/config/config_test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ framework:
1010
resource: "%kernel.project_dir%/App/config/routing.yaml"
1111
utf8: true
1212
session:
13+
handler_id: null
1314
storage_factory_id: session.storage.factory.mock_file
1415

1516
twig:

Tests/bootstrap.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,5 @@
3434
fwrite(STDERR, $e->getMessage());
3535
}
3636
}
37-
$kernel->shutdown();
3837
unset($kernel);
3938
})();

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"license": "MIT",
88
"require": {
99
"php": ">=7.3",
10-
"doctrine/annotations": "^1.8",
10+
"doctrine/annotations": "^1.8|^2.0",
1111
"doctrine/doctrine-bundle": "^2.0",
1212
"doctrine/orm": "^2.5.1",
1313
"symfony/asset": "^5.3|^6.0|^7.0",
@@ -51,7 +51,7 @@
5151
],
5252
"extra": {
5353
"branch-alias": {
54-
"dev-master": "4.x-dev"
54+
"dev-master": "5.x-dev"
5555
}
5656
}
5757
}

0 commit comments

Comments
 (0)