質問編集履歴

3

debug(TESTS);debug(APP_TEST_CASES);の結果を追記

2019/12/03 08:22

投稿

cat0138
cat0138

スコア33

test CHANGED
File without changes
test CHANGED
@@ -92,6 +92,8 @@
92
92
 
93
93
  ※デフォルトのままかと存じます。
94
94
 
95
+ ※20191203追記:debug(TESTS);debug(APP_TEST_CASES);の結果を追記しております。
96
+
95
97
  ```php
96
98
 
97
99
 
@@ -322,4 +324,16 @@
322
324
 
323
325
 
324
326
 
327
+ debug(TESTS);
328
+
329
+ //結果:'/var/www/html/app/Test'
330
+
331
+
332
+
333
+ debug(APP_TEST_CASES)
334
+
335
+ //結果:'/var/www/html/app/Test/Case'
336
+
337
+
338
+
325
339
  ```

2

phpの記述を追加

2019/12/03 08:22

投稿

cat0138
cat0138

スコア33

test CHANGED
File without changes
test CHANGED
@@ -85,3 +85,241 @@
85
85
 
86
86
 
87
87
  ```
88
+
89
+
90
+
91
+ /app/webroot/test.phpのファイルを記載いたします。
92
+
93
+ ※デフォルトのままかと存じます。
94
+
95
+ ```php
96
+
97
+
98
+
99
+ <?php
100
+
101
+ /**
102
+
103
+ * Web Access Frontend for TestSuite
104
+
105
+ *
106
+
107
+ * CakePHP(tm) Tests <https://book.cakephp.org/2.0/en/development/testing.html>
108
+
109
+ * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
110
+
111
+ *
112
+
113
+ * Licensed under The MIT License
114
+
115
+ * For full copyright and license information, please see the LICENSE.txt
116
+
117
+ * Redistributions of files must retain the above copyright notice
118
+
119
+ *
120
+
121
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
122
+
123
+ * @link https://book.cakephp.org/2.0/en/development/testing.html
124
+
125
+ * @package app.webroot
126
+
127
+ * @since CakePHP(tm) v 1.2.0.4433
128
+
129
+ * @license https://opensource.org/licenses/mit-license.php MIT License
130
+
131
+ */
132
+
133
+
134
+
135
+ set_time_limit(0);
136
+
137
+ ini_set('display_errors', 1);
138
+
139
+
140
+
141
+ /**
142
+
143
+ * Use the DS to separate the directories in other defines
144
+
145
+ */
146
+
147
+ if (!defined('DS')) {
148
+
149
+ define('DS', DIRECTORY_SEPARATOR);
150
+
151
+ }
152
+
153
+
154
+
155
+ /**
156
+
157
+ * These defines should only be edited if you have CakePHP installed in
158
+
159
+ * a directory layout other than the way it is distributed.
160
+
161
+ * When using custom settings be sure to use the DS and do not add a trailing DS.
162
+
163
+ */
164
+
165
+
166
+
167
+ /**
168
+
169
+ * The full path to the directory which holds "app", WITHOUT a trailing DS.
170
+
171
+ */
172
+
173
+ if (!defined('ROOT')) {
174
+
175
+ define('ROOT', dirname(dirname(dirname(__FILE__))));
176
+
177
+ }
178
+
179
+
180
+
181
+ /**
182
+
183
+ * The actual directory name for the "app".
184
+
185
+ */
186
+
187
+ if (!defined('APP_DIR')) {
188
+
189
+ define('APP_DIR', basename(dirname(dirname(__FILE__))));
190
+
191
+ }
192
+
193
+
194
+
195
+ /**
196
+
197
+ * Config Directory
198
+
199
+ */
200
+
201
+ if (!defined('CONFIG')) {
202
+
203
+ define('CONFIG', ROOT . DS . APP_DIR . DS . 'Config' . DS);
204
+
205
+ }
206
+
207
+
208
+
209
+ /**
210
+
211
+ * The absolute path to the "Cake" directory, WITHOUT a trailing DS.
212
+
213
+ *
214
+
215
+ * For ease of development CakePHP uses PHP's include_path. If you
216
+
217
+ * need to cannot modify your include_path, you can set this path.
218
+
219
+ *
220
+
221
+ * Leaving this constant undefined will result in it being defined in Cake/bootstrap.php
222
+
223
+ *
224
+
225
+ * The following line differs from its sibling
226
+
227
+ * /lib/Cake/Console/Templates/skel/webroot/test.php
228
+
229
+ */
230
+
231
+ //define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'lib');
232
+
233
+
234
+
235
+ /**
236
+
237
+ * This auto-detects CakePHP as a composer installed library.
238
+
239
+ * You may remove this if you are not planning to use composer (not recommended, though).
240
+
241
+ */
242
+
243
+ $vendorPath = ROOT . DS . APP_DIR . DS . 'Vendor' . DS . 'cakephp' . DS . 'cakephp' . DS . 'lib';
244
+
245
+ $dispatcher = 'Cake' . DS . 'Console' . DS . 'ShellDispatcher.php';
246
+
247
+ if (!defined('CAKE_CORE_INCLUDE_PATH') && file_exists($vendorPath . DS . $dispatcher)) {
248
+
249
+ define('CAKE_CORE_INCLUDE_PATH', $vendorPath);
250
+
251
+ }
252
+
253
+
254
+
255
+ /**
256
+
257
+ * Editing below this line should not be necessary.
258
+
259
+ * Change at your own risk.
260
+
261
+ */
262
+
263
+ if (!defined('WEBROOT_DIR')) {
264
+
265
+ define('WEBROOT_DIR', basename(dirname(__FILE__)));
266
+
267
+ }
268
+
269
+ if (!defined('WWW_ROOT')) {
270
+
271
+ define('WWW_ROOT', dirname(__FILE__) . DS);
272
+
273
+ }
274
+
275
+
276
+
277
+ if (!defined('CAKE_CORE_INCLUDE_PATH')) {
278
+
279
+ if (function_exists('ini_set')) {
280
+
281
+ ini_set('include_path', ROOT . DS . 'lib' . PATH_SEPARATOR . ini_get('include_path'));
282
+
283
+ }
284
+
285
+ if (!include 'Cake' . DS . 'bootstrap.php') {
286
+
287
+ $failed = true;
288
+
289
+ }
290
+
291
+ } else {
292
+
293
+ if (!include CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'bootstrap.php') {
294
+
295
+ $failed = true;
296
+
297
+ }
298
+
299
+ }
300
+
301
+ if (!empty($failed)) {
302
+
303
+ trigger_error("CakePHP core could not be found. Check the value of CAKE_CORE_INCLUDE_PATH in APP/webroot/test.php. It should point to the directory containing your " . DS . "cake core directory and your " . DS . "vendors root directory.", E_USER_ERROR);
304
+
305
+ }
306
+
307
+
308
+
309
+ if (Configure::read('debug') < 1) {
310
+
311
+ throw new NotFoundException(__d('cake_dev', 'Debug setting does not allow access to this URL.'));
312
+
313
+ }
314
+
315
+
316
+
317
+ require_once CAKE . 'TestSuite' . DS . 'CakeTestSuiteDispatcher.php';
318
+
319
+
320
+
321
+ CakeTestSuiteDispatcher::run();
322
+
323
+
324
+
325
+ ```

1

vagrantの記述を更新しました

2019/12/02 08:26

投稿

cat0138
cat0138

スコア33

test CHANGED
File without changes
test CHANGED
@@ -23,3 +23,65 @@
23
23
  不足している情報はご指摘いただけますと幸いです。
24
24
 
25
25
  どうぞよろしくお願いいたします。
26
+
27
+
28
+
29
+ ## 追記
30
+
31
+ vagrantファイルのソースを記載いたします。
32
+
33
+
34
+
35
+ ```vagrant
36
+
37
+ # -*- mode: ruby -*-
38
+
39
+ # vi: set ft=ruby :
40
+
41
+
42
+
43
+ Vagrant.configure("2") do |config|
44
+
45
+
46
+
47
+ config.vm.box = "ubuntu/disco64"
48
+
49
+ config.vm.box_version = "20190514.0.1"
50
+
51
+
52
+
53
+ config.vm.hostname = "test.test"
54
+
55
+ config.vm.network "private_network", ip: "192.168.33.10"
56
+
57
+ # 20190819追記(タイムアウトをすることが多いため)
58
+
59
+ # https://www.84kure.com/blog/2016/01/02/vagrant-vagrant-up%E3%81%8C%E3%82%BF%E3%82%A4%E3%83%A0%E3%82%A2%E3%82%A6%E3%83%88%E3%81%AB%E3%81%AA%E3%82%8B%E3%81%A8%E3%81%8D%E3%81%AE%E5%AF%BE%E5%87%A6%E6%B3%95/
60
+
61
+ config.vm.boot_timeout = 600
62
+
63
+
64
+
65
+ config.vm.synced_folder ".", "/vagrant", type:"virtualbox"
66
+
67
+ config.vm.synced_folder "../ansible_project", "/var/www/html", type:"virtualbox", owner: 'vagrant', group: 'www-data', mount_options: ['dmode=777', 'fmode=666']
68
+
69
+ config.vm.synced_folder "../ansible_project/app/tmp", "/var/www/html/app/tmp", type:"virtualbox", owner: 'www-data', group: 'www-data', mount_options: ['dmode=777', 'fmode=777']
70
+
71
+
72
+
73
+ # 2019/06/24 add https://github.com/dotless-de/vagrant-vbguest/issues/333
74
+
75
+ if Vagrant.has_plugin?("vagrant-vbguest")
76
+
77
+ config.vbguest.auto_update = false
78
+
79
+ end
80
+
81
+
82
+
83
+ end
84
+
85
+
86
+
87
+ ```