adding example apps, fixing powerup issues
[feisty_meow.git] / production / example_apps / shared_calendar / tests / TestCase / ApplicationTest.php
1 <?php
2 /**
3  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
4  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
5  *
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
9  *
10  * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
11  * @link          http://cakephp.org CakePHP(tm) Project
12  * @since         3.3.0
13  * @license       http://www.opensource.org/licenses/mit-license.php MIT License
14  */
15 namespace App\Test\TestCase;
16
17 use App\Application;
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;
23
24 /**
25  * ApplicationTest class
26  */
27 class ApplicationTest extends IntegrationTestCase
28 {
29
30     /**
31      * testMiddleware
32      *
33      * @return void
34      */
35     public function testMiddleware()
36     {
37         $app = new Application(dirname(dirname(__DIR__)) . '/config');
38         $middleware = new MiddlewareQueue();
39
40         $middleware = $app->middleware($middleware);
41
42         $this->assertInstanceOf(ErrorHandlerMiddleware::class, $middleware->get(0));
43         $this->assertInstanceOf(AssetMiddleware::class, $middleware->get(1));
44         $this->assertInstanceOf(RoutingMiddleware::class, $middleware->get(2));
45     }
46 }