Skip to content

Commit 6c4eee3

Browse files
committed
Merge remote-tracking branch 'origin/master' into cake5
# Conflicts: # phpunit.xml.dist
2 parents 5363b55 + f641542 commit 6c4eee3

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

phpunit.xml.dist

-2
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
<ini name="error_reporting" value="32767"/>
99
</php>
1010

11-
<!-- Add any additional test suites you want to run here -->
1211
<testsuites>
1312
<testsuite name="markup">
1413
<directory>tests/TestCase/</directory>
1514
</testsuite>
16-
<!-- Add plugin test suites here. -->
1715
</testsuites>
1816

1917
<source>

tests/bootstrap.php

+15-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
<?php
22

3-
require dirname(__DIR__) . '/vendor/cakephp/cakephp/src/basics.php';
4-
require dirname(__DIR__) . '/vendor/autoload.php';
3+
use Cake\Cache\Cache;
4+
use Cake\Core\Configure;
5+
use Cake\Datasource\ConnectionManager;
56

7+
if (!defined('DS')) {
8+
define('DS', DIRECTORY_SEPARATOR);
9+
}
610
define('ROOT', dirname(__DIR__));
711
define('APP_DIR', 'src');
812

@@ -25,12 +29,16 @@
2529
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
2630
define('CAKE', CORE_PATH . 'src' . DS);
2731

28-
Cake\Core\Configure::write('App', [
32+
require dirname(__DIR__) . '/vendor/autoload.php';
33+
require CORE_PATH . 'config/bootstrap.php';
34+
require CAKE_CORE_INCLUDE_PATH . '/src/functions.php';
35+
36+
Configure::write('App', [
2937
'namespace' => 'App',
3038
'encoding' => 'UTF-8',
3139
]);
3240

33-
Cake\Core\Configure::write('debug', true);
41+
Configure::write('debug', true);
3442

3543
$cache = [
3644
'default' => [
@@ -53,10 +61,10 @@
5361
],
5462
];
5563

56-
Cake\Cache\Cache::setConfig($cache);
64+
Cache::setConfig($cache);
5765

5866
if (file_exists(CONFIG . 'app_local.php')) {
59-
Cake\Core\Configure::load('app_local', 'default');
67+
Configure::load('app_local', 'default');
6068
}
6169

6270
// Ensure default test connection is defined
@@ -65,7 +73,7 @@
6573
putenv('db_dsn=sqlite::memory:');
6674
}
6775

68-
Cake\Datasource\ConnectionManager::setConfig('test', [
76+
ConnectionManager::setConfig('test', [
6977
'className' => 'Cake\Database\Connection',
7078
'driver' => getenv('db_class') ?: null,
7179
'dsn' => getenv('db_dsn') ?: null,

0 commit comments

Comments
 (0)