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

tests: activation de doctrine.

parent a4d0cd67
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
/composer.lock /composer.lock
/dist /dist
/node_modules /node_modules
/var /tests/Fixtures/var
.php_cs.*cache .php_cs.*cache
.idea .idea
...@@ -12,15 +12,14 @@ namespace Irstea\NgModelGeneratorBundle\Tests\Fixtures; ...@@ -12,15 +12,14 @@ namespace Irstea\NgModelGeneratorBundle\Tests\Fixtures;
use ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle; use ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle;
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
use Irstea\NgModelGeneratorBundle\NgModelGeneratorBundle; use Irstea\NgModelGeneratorBundle\NgModelGeneratorBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle; use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Bundle\TwigBundle\TwigBundle; use Symfony\Bundle\TwigBundle\TwigBundle;
use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Routing\RouteCollectionBuilder; use Symfony\Component\Routing\RouteCollectionBuilder;
/** /**
...@@ -39,11 +38,20 @@ final class TestKernel extends Kernel ...@@ -39,11 +38,20 @@ final class TestKernel extends Kernel
new FrameworkBundle(), new FrameworkBundle(),
new ApiPlatformBundle(), new ApiPlatformBundle(),
new TwigBundle(), new TwigBundle(),
new DoctrineBundle(),
new NgModelGeneratorBundle() new NgModelGeneratorBundle()
]; ];
} }
/**
* @inheritDoc
*/
public function getProjectDir()
{
return __DIR__;
}
/** /**
* @inheritDoc * @inheritDoc
*/ */
......
...@@ -2,7 +2,35 @@ framework: ...@@ -2,7 +2,35 @@ framework:
templating: templating:
engines: [twig] engines: [twig]
secret: Foo secret: Foo
serializer:
enable_annotations: true
api_platform: ~ api_platform:
title: Deepomics
version: 1.0.0
mapping:
paths:
- '%kernel.project_dir%/Entity'
collection:
pagination:
client_items_per_page: true
items_per_page_parameter_name: pageSize
ng_model_generator: ~ ng_model_generator: ~
doctrine:
dbal:
driver: 'pdo_sqlite'
url: '%kernel.project_dir%/var/database.sqlite'
orm:
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
mappings:
Irstea\NgModelGeneratorBundle\Tests\Fixtures:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/Entity'
prefix: 'Irstea\NgModelGeneratorBundle\Tests\Fixtures'
...@@ -7,7 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Console\Application; ...@@ -7,7 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Console\Application;
require dirname(__DIR__, 2) . '/vendor/autoload.php'; require dirname(__DIR__, 2) . '/vendor/autoload.php';
$env = $_ENV['APP_ENV'] ?? 'prod'; $env = $_ENV['APP_ENV'] ?? 'dev';
$debug = $_ENV['APP_DEBUG'] ?? ($env !== 'prod'); $debug = $_ENV['APP_DEBUG'] ?? ($env !== 'prod');
$kernel = new TestKernel($env, $debug); $kernel = new TestKernel($env, $debug);
......
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