Skip to content

Commit cd92ae8

Browse files
committed
Update travis.
1 parent db138dc commit cd92ae8

File tree

3 files changed

+86
-25
lines changed

3 files changed

+86
-25
lines changed

composer.json

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
2-
"name": "holt59/cakephp3-bootstrap-helpers",
3-
"description": "Bootstrap Helpers for CakePHP 3.0",
4-
"keywords": ["CakePHP", "Bootstrap"],
5-
"license": "Apache",
6-
"type": "cakephp-plugin",
7-
"require": {
8-
"cakephp/cakephp": "~3.0"
9-
},
10-
"require-dev": {
11-
"phpunit/phpunit": "*"
12-
},
13-
"autoload": {
14-
"psr-4": {
15-
"Bootstrap\\": "src"
16-
}
17-
},
18-
"autoload-dev": {
19-
"psr-4": {
20-
"Bootstrap\\Test\\": "tests"
21-
}
22-
},
23-
"extra": {
24-
"installer-name": "Bootstrap"
25-
}
2+
"name": "holt59/cakephp3-bootstrap-helpers",
3+
"description": "Bootstrap Helpers for CakePHP 3.0",
4+
"keywords": ["CakePHP", "Bootstrap"],
5+
"license": "Apache",
6+
"type": "cakephp-plugin",
7+
"require": {
8+
"cakephp/cakephp": "~3.0"
9+
},
10+
"require-dev": {
11+
"phpunit/phpunit": "*"
12+
},
13+
"autoload": {
14+
"psr-4": {
15+
"Bootstrap\\": "src"
16+
}
17+
},
18+
"autoload-dev": {
19+
"psr-4": {
20+
"Bootstrap\\Test\\": "tests"
21+
}
22+
},
23+
"extra": {
24+
"installer-name": "Bootstrap"
25+
}
2626
}

phpunit.xml.dist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<phpunit
33
colors="true"
44
stopOnFailure="false"
5+
bootstrap="./tests/bootstrap.php"
56
>
67

78
<testsuites>
@@ -15,4 +16,4 @@
1516
<directory suffix=".php">./src/</directory>
1617
</whitelist>
1718
</filter>
18-
</phpunit>
19+
</phpunit>

tests/bootstrap.php

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?php
2+
3+
// @codingStandardsIgnoreFile
4+
use Cake\Cache\Cache;
5+
use Cake\Core\Configure;
6+
use Cake\Core\Plugin;
7+
use Cake\Datasource\ConnectionManager;
8+
use Cake\I18n\I18n;
9+
require_once 'vendor/autoload.php';
10+
// Path constants to a few helpful things.
11+
if (!defined('DS')) {
12+
define('DS', DIRECTORY_SEPARATOR);
13+
}
14+
define('ROOT', dirname(__DIR__) . DS);
15+
define('CAKE_CORE_INCLUDE_PATH', ROOT . 'vendor' . DS . 'cakephp' . DS . 'cakephp');
16+
define('CORE_PATH', ROOT . 'vendor' . DS . 'cakephp' . DS . 'cakephp' . DS);
17+
define('CAKE', CORE_PATH . 'src' . DS);
18+
define('TESTS', ROOT . 'tests');
19+
define('APP', ROOT . 'tests' . DS . 'test_files' . DS . 'app' . DS);
20+
define('APP_DIR', 'app');
21+
define('WEBROOT_DIR', 'webroot');
22+
define('WWW_ROOT', dirname(APP) . DS . 'webroot' . DS);
23+
define('TMP', sys_get_temp_dir() . DS);
24+
define('CONFIG', APP . 'config' . DS);
25+
define('CACHE', TMP);
26+
define('LOGS', TMP);
27+
require_once CORE_PATH . 'config/bootstrap.php';
28+
date_default_timezone_set('UTC');
29+
mb_internal_encoding('UTF-8');
30+
Configure::write('debug', true);
31+
Configure::write('App', [
32+
'namespace' => 'App',
33+
'encoding' => 'UTF-8',
34+
'base' => false,
35+
'baseUrl' => false,
36+
'dir' => 'src',
37+
'webroot' => WEBROOT_DIR,
38+
'www_root' => WWW_ROOT,
39+
'fullBaseUrl' => 'http://localhost',
40+
'imageBaseUrl' => 'img/',
41+
'jsBaseUrl' => 'js/',
42+
'cssBaseUrl' => 'css/',
43+
'paths' => [
44+
'plugins' => [dirname(APP) . DS . 'plugins' . DS],
45+
'templates' => [APP . 'Template' . DS]
46+
]
47+
]);
48+
Cache::config([
49+
'_cake_core_' => [
50+
'engine' => 'File',
51+
'prefix' => 'cake_core_',
52+
'serialize' => true
53+
],
54+
'_cake_model_' => [
55+
'engine' => 'File',
56+
'prefix' => 'cake_model_',
57+
'serialize' => true
58+
]
59+
]);
60+
Plugin::load('Bootstrap', ['path' => ROOT]);

0 commit comments

Comments
 (0)