tests wip
This commit is contained in:
39
tests/test_app/src/Application.php
Normal file
39
tests/test_app/src/Application.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace TestApp;
|
||||
|
||||
use Cake\Http\BaseApplication;
|
||||
use Cake\Http\MiddlewareQueue;
|
||||
use Cake\Routing\Middleware\RoutingMiddleware;
|
||||
use Cake\Routing\Route\DashedRoute;
|
||||
use Cake\Routing\RouteBuilder;
|
||||
|
||||
class Application extends BaseApplication {
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function bootstrap(): void {
|
||||
$this->addPlugin('CakeCarts');
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function middleware(MiddlewareQueue $middleware): MiddlewareQueue {
|
||||
$middleware->add(new RoutingMiddleware($this));
|
||||
|
||||
return $middleware;
|
||||
}
|
||||
|
||||
public function routes(RouteBuilder $routes): void
|
||||
{
|
||||
parent::routes($routes); // TODO: Change the autogenerated stub
|
||||
$routes->setRouteClass(DashedRoute::class);
|
||||
|
||||
$routes->plugin('CakeCarts', ['path' => '/cake-carts'], function (RouteBuilder $pluginRoutes):void {
|
||||
$pluginRoutes->fallbacks();
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user