File tree 4 files changed +19
-4
lines changed
4 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 41
41
use Cake \Datasource \ConnectionManager ;
42
42
use Cake \Error \ErrorTrap ;
43
43
use Cake \Error \ExceptionTrap ;
44
- use Cake \I18n \FrozenTime ;
44
+ use Cake \I18n \DateTime ;
45
45
use Cake \Log \Log ;
46
46
use Cake \Mailer \Mailer ;
47
47
use Cake \Mailer \TransportFactory ;
48
48
use Cake \Routing \Router ;
49
49
use Cake \Utility \Security ;
50
50
51
+ /**
52
+ * Load global functions.
53
+ */
54
+ require CAKE . 'functions.php ' ;
55
+
51
56
/*
52
57
* Read configuration file and inject configuration into various
53
58
* CakePHP classes.
102
107
if (Configure::read ('debug ' )) {
103
108
Configure::write ('Cache._cake_model_.duration ' , '+2 minutes ' );
104
109
Configure::write ('Cache._cake_core_.duration ' , '+2 minutes ' );
105
- Configure::write ('Cache._cake_routes_.duration ' , '+2 seconds ' );
106
110
}
107
111
108
112
/*
191
195
Security::setSalt (Configure::consume ('Security.salt ' ));
192
196
193
197
// Enforce the json time format
194
- FrozenTime ::setJsonEncodeFormat ("yyyy-MM-dd'T'HH':'mm':'ssxxx " );
198
+ DateTime ::setJsonEncodeFormat ("yyyy-MM-dd'T'HH':'mm':'ssxxx " );
195
199
196
200
/*
197
201
* Setup detectors for mobile and tablet.
Original file line number Diff line number Diff line change 12
12
* @link https://www.passbolt.com Passbolt(tm)
13
13
* @since 2.0.0
14
14
*/
15
- use Cake \Core \Plugin ;
16
15
use Cake \Routing \RouteBuilder ;
17
16
use Cake \Routing \Router ;
18
17
use Cake \Routing \Route \DashedRoute ;
Original file line number Diff line number Diff line change 10
10
<exclude-pattern >*.js</exclude-pattern >
11
11
12
12
<rule ref =" CakePHP" />
13
+ <rule ref =" SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint" >
14
+ <exclude-pattern >*/src/Controller/*</exclude-pattern >
15
+ </rule >
13
16
14
17
<rule ref =" Generic.Formatting.SpaceAfterNot" >
15
18
<properties >
Original file line number Diff line number Diff line change 8
8
* unit tests in this file.
9
9
*/
10
10
11
+ use Cake \Chronos \Chronos ;
11
12
use Cake \TestSuite \ConnectionHelper ;
12
13
use Migrations \TestSuite \Migrator ;
13
14
16
17
17
18
$ _SERVER ['PHP_SELF ' ] = '/ ' ;
18
19
20
+ // Fixate now to avoid one-second-leap-issues
21
+ Chronos::setTestNow (Chronos::now ());
22
+
23
+ // Fixate sessionid early on, as php7.2+
24
+ // does not allow the sessionid to be set after stdout
25
+ // has been written to.
26
+ session_id ('cli ' );
27
+
19
28
(new ConnectionHelper ())->addTestAliases ();
20
29
(new Migrator ())->run ();
You can’t perform that action at this time.
0 commit comments