Skip to content

Commit 7467fc0

Browse files
[Tests] Clearing the cache before running tests
1 parent d9b686a commit 7467fc0

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
/var
12
/vendor
23
/composer.lock

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
phpunit:
1+
clear-cache:
2+
rm -rf var
3+
4+
phpunit: clear-cache
25
docker-compose run --rm -T php /usr/local/bin/php /app/vendor/bin/phpunit
36

4-
phpstan:
7+
phpstan: clear-cache
58
docker-compose run --rm -T php /usr/local/bin/php /app/vendor/bin/phpstan analyse
69

7-
coverage:
10+
coverage: clear-cache
811
docker-compose run --rm -T php /usr/local/bin/php /app/vendor/bin/phpunit --coverage-html=vendor/coverage
912

1013
composer-update:

tests/Fixture/App/Kernel.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace SymfonyBundles\JsonRequestBundle\Tests\Fixture\App;
44

5-
use Symfony\Component\Filesystem\Filesystem;
65
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
76
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
87
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
@@ -20,13 +19,6 @@ public function registerBundles(): iterable
2019
];
2120
}
2221

23-
public function shutdown(): void
24-
{
25-
parent::shutdown();
26-
27-
(new Filesystem())->remove($this->getCacheDir());
28-
}
29-
3022
protected function configureContainer(ContainerConfigurator $container): void
3123
{
3224
$container->import('../config/config.yaml');

0 commit comments

Comments
 (0)