diff --git a/composer.json b/composer.json index 3e15dc2..fa464b2 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "cakephp/debug_kit": "^5.0", "michelf/php-markdown": "^1.9", "mikey179/vfsstream": "^1.6.10", - "phpunit/phpunit": "^10.5.5 || ^11.1.3" + "phpunit/phpunit": "^11.5.3 | ^12.1.3" }, "conflict": { "wyrihaximus/twig-view": "*" diff --git a/tests/TestCase/Twig/FileLoaderTest.php b/tests/TestCase/Twig/FileLoaderTest.php index a0e16d5..6961bd7 100644 --- a/tests/TestCase/Twig/FileLoaderTest.php +++ b/tests/TestCase/Twig/FileLoaderTest.php @@ -18,6 +18,7 @@ namespace Cake\TwigView\Test\TestCase\Twig; +use Cake\Routing\Router; use Cake\TestSuite\TestCase; use Cake\TwigView\Twig\FileLoader; use Twig\Error\LoaderError; @@ -36,6 +37,7 @@ public function setUp(): void { parent::setUp(); + Router::reload(); $this->loadPlugins(['TestTwigView']); $this->loader = new FileLoader(['.twig']); @@ -81,7 +83,7 @@ public function testGetCacheKeyPluginNonExistingFile() public function testIsFresh() { - file_put_contents(TMP . 'TwigViewIsFreshTest', 'TwigViewIsFreshTest'); + file_put_contents(TMP . 'TwigViewIsFreshTest', 'is fresh test'); $time = filemtime(TMP . 'TwigViewIsFreshTest'); $this->assertTrue($this->loader->isFresh(TMP . 'TwigViewIsFreshTest', $time + 5)); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index e73aae0..2cd2c38 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -58,6 +58,13 @@ 'default' => [ 'engine' => 'File', ], + '_cake_core_' => [ + 'className' => 'File', + 'prefix' => '_cake_translations_', + 'path' => CACHE . 'persistent/', + 'serialize' => true, + 'duration' => '+10 seconds', + ], '_cake_translations_' => [ 'className' => 'File', 'prefix' => '_cake_translations_',