Commit a4d0cd67 authored by Guillaume Perréal's avatar Guillaume Perréal Committed by Guillaume Perréal
Browse files

dev: ajout d'une "application" de test.

parent a6357b5f
......@@ -2,5 +2,6 @@
/composer.lock
/dist
/node_modules
/var
.php_cs.*cache
.idea
......@@ -25,12 +25,14 @@
"doctrine/inflector": "^1.3",
"psr/container": "^1.0",
"symfony/config": "^3.4 | ^4.0",
"symfony/console": "^3.4 | ^4.1",
"symfony/console": "^3.4 | ^4.0",
"symfony/dependency-injection": "^3.4 | ^4.0",
"symfony/http-kernel": "^3.4 | ^4.0",
"symfony/property-info": "^3.4 | ^4.0",
"symfony/routing": "^3.4 | ^4.0",
"symfony/serializer": "^3.4 | ^4.0",
"symfony/templating": "^3.4 | ^4.0",
"symfony/twig-bundle": "^3.4 | ^4.0",
"twig/twig": "^2.2"
},
"require-dev": {
......@@ -41,7 +43,9 @@
"maglnet/composer-require-checker": "^1.0",
"phploc/phploc": "^4.0",
"phpunit/phpunit": "^7.3",
"sebastian/phpcpd": "^4.0"
"sebastian/phpcpd": "^4.0",
"symfony/framework-bundle": "^3.4 | ^4.0",
"symfony/yaml": "^3.4 | ^4.0"
},
"scripts": {
"fix-cs": "@php vendor/bin/php-cs-fixer fix --verbose",
......
<?php declare(strict_types=1);
/**
* Copyright (C) 2019 IRSTEA
* All rights reserved.
*
* @copyright 2019 IRSTEA
* @author guillaume.perreal
*/
namespace Irstea\NgModelGeneratorBundle\Tests\Fixtures;
use ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle;
use Irstea\NgModelGeneratorBundle\NgModelGeneratorBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Bundle\TwigBundle\TwigBundle;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\RouteCollectionBuilder;
/**
* Class TestKernel
*/
final class TestKernel extends Kernel
{
use MicroKernelTrait;
/**
* @inheritDoc
*/
public function registerBundles()
{
return [
new FrameworkBundle(),
new ApiPlatformBundle(),
new TwigBundle(),
new NgModelGeneratorBundle()
];
}
/**
* @inheritDoc
*/
protected function configureRoutes(RouteCollectionBuilder $routes)
{
}
/**
* @inheritDoc
*/
protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader)
{
$loader->load(__DIR__ . '/config/services.yml', 'yaml');
// TODO: Implement configureContainer() method.
}
}
framework:
templating:
engines: [twig]
secret: Foo
api_platform: ~
ng_model_generator: ~
#!/usr/bin/env php
<?php declare(strict_types=1);
namespace Irstea\NgModelGeneratorBundle\Tests\Fixtures;
use Symfony\Bundle\FrameworkBundle\Console\Application;
require dirname(__DIR__, 2) . '/vendor/autoload.php';
$env = $_ENV['APP_ENV'] ?? 'prod';
$debug = $_ENV['APP_DEBUG'] ?? ($env !== 'prod');
$kernel = new TestKernel($env, $debug);
$kernel->boot();
$application = new Application($kernel);
$application->run();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment