Skip to content

Commit ca2a65b

Browse files
committed
Ensure tests are executed with up-to-date dependencies
1 parent 7a88232 commit ca2a65b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

phpunit/bootstrap.php

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545

4646
define('FIXTURE_DIR', __DIR__ . "/../tests/fixtures");
4747

48+
// Check the resources state before trying to be sure that the tests are executed with up-to-date dependencies.
49+
require_once dirname(__DIR__) . '/src/Glpi/Application/ResourcesChecker.php';
50+
(new \Glpi\Application\ResourcesChecker(dirname(__DIR__)))->checkResources();
51+
4852
// Make sure cached content like twig template is cleared before running the tests.
4953
// It seems calling $cache_manager->resetAllCaches(); mess up with the kernel
5054
// leading to some issues. It is safer to use the console directly as it goes

tests/bootstrap.php

+4
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
define('TU_USER', '_test_user');
4444
define('TU_PASS', 'PhpUnit_4');
4545

46+
// Check the resources state before trying to be sure that the tests are executed with up-to-date dependencies.
47+
require_once dirname(__DIR__) . '/src/Glpi/Application/ResourcesChecker.php';
48+
(new \Glpi\Application\ResourcesChecker(dirname(__DIR__)))->checkResources();
49+
4650
// Make sure cached content like twig template is cleared before running the tests.
4751
// It seems calling $cache_manager->resetAllCaches(); mess up with the kernel
4852
// leading to some issues. It is safer to use the console directly as it goes

0 commit comments

Comments
 (0)