Skip to content

Commit f22cb43

Browse files
committed
Handle BC with CakePHP 5.0
1 parent 971523c commit f22cb43

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

plugins/crud/tests/TestCase/ControllerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public function test_view(): void
4545

4646
public function test_add(): void
4747
{
48+
$this->disableErrorHandlerMiddleware();
4849
$this->configRequest([
4950
'headers' => ['Content-Type' => 'application/json']
5051
]);

plugins/mixerapi/assets/app.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,9 @@
109109
* Duration will be set to '+2 minutes' in bootstrap.php when debug = true
110110
* If you set 'className' => 'Null' core cache will be disabled.
111111
*/
112-
'_cake_core_' => [
112+
'_cake_translations_' => [
113113
'className' => FileEngine::class,
114-
'prefix' => 'myapp_cake_core_',
114+
'prefix' => 'myapp_cake_translations_',
115115
'path' => CACHE . 'persistent' . DS,
116116
'serialize' => true,
117117
'duration' => '+1 years',

tests/bootstrap.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4+
use Cake\Cache\Cache;
45
use Cake\Core\Configure;
56
use Cake\TestSuite\Fixture\SchemaLoader;
67

@@ -35,3 +36,13 @@
3536
*/
3637
putenv('DB_DSN=sqlite:///:memory:');
3738
(new SchemaLoader())->loadInternalFile(__DIR__ . DS . 'schema.php');
39+
40+
// @todo: Remove when support for CakePHP 5.0 is dropped
41+
Cache::setConfig([
42+
'_cake_core_' => [
43+
'engine' => 'File',
44+
'prefix' => 'cake_core_',
45+
'serialize' => true,
46+
'path' => CACHE,
47+
],
48+
]);

0 commit comments

Comments
 (0)