3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
6 * Licensed under The MIT License
7 * For full copyright and license information, please see the LICENSE.txt
8 * Redistributions of files must retain the above copyright notice
10 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
11 * @link http://cakephp.org CakePHP(tm) Project
13 * @license http://www.opensource.org/licenses/mit-license.php MIT License
15 namespace App\Test\TestCase;
18 use Cake\Error\Middleware\ErrorHandlerMiddleware;
19 use Cake\Http\MiddlewareQueue;
20 use Cake\Routing\Middleware\AssetMiddleware;
21 use Cake\Routing\Middleware\RoutingMiddleware;
22 use Cake\TestSuite\IntegrationTestCase;
25 * ApplicationTest class
27 class ApplicationTest extends IntegrationTestCase
35 public function testMiddleware()
37 $app = new Application(dirname(dirname(__DIR__)) . '/config');
38 $middleware = new MiddlewareQueue();
40 $middleware = $app->middleware($middleware);
42 $this->assertInstanceOf(ErrorHandlerMiddleware::class, $middleware->get(0));
43 $this->assertInstanceOf(AssetMiddleware::class, $middleware->get(1));
44 $this->assertInstanceOf(RoutingMiddleware::class, $middleware->get(2));