Browse Source

Fixed ConsoleIntegrationTestCase failing to load user bootstrap files

Jeremy Harris 7 years ago
parent
commit
1cc085d8d7

+ 1 - 1
src/TestSuite/ConsoleIntegrationTestCase.php

@@ -253,7 +253,7 @@ abstract class ConsoleIntegrationTestCase extends TestCase
         if ($this->_useCommandRunner) {
             $applicationClassName = Configure::read('App.namespace') . '\Application';
 
-            return new CommandRunner(new $applicationClassName([CONFIG]));
+            return new CommandRunner(new $applicationClassName(CONFIG));
         }
 
         return new LegacyCommandRunner();

+ 0 - 11
tests/test_app/TestApp/Application.php

@@ -19,17 +19,6 @@ use Cake\Routing\Middleware\RoutingMiddleware;
 
 class Application extends BaseApplication
 {
-    /**
-     * Bootstrap hook.
-     *
-     * Nerfed as this is for IntegrationTestCase testing.
-     *
-     * @return void
-     */
-    public function bootstrap()
-    {
-        // Do nothing.
-    }
 
     public function middleware($middleware)
     {

+ 2 - 0
tests/test_app/config/bootstrap.php

@@ -0,0 +1,2 @@
+<?php
+// Do nothing