mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Adding Tests
This commit is contained in:
BIN
Tests/Fixtures/.DS_Store
vendored
Normal file
BIN
Tests/Fixtures/.DS_Store
vendored
Normal file
Binary file not shown.
37
Tests/Fixtures/App/AppKernel.php
Normal file
37
Tests/Fixtures/App/AppKernel.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
|
||||
class AppKernel extends Kernel
|
||||
{
|
||||
public function registerBundles()
|
||||
{
|
||||
return array(
|
||||
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
||||
new Chill\ReportBundle\ChillReportBundle(),
|
||||
new Symfony\Bundle\TwigBundle\TwigBundle(),
|
||||
);
|
||||
}
|
||||
|
||||
public function registerContainerConfiguration(LoaderInterface $loader)
|
||||
{
|
||||
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getCacheDir()
|
||||
{
|
||||
return sys_get_temp_dir().'/ChillReportBundle/cache';
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getLogDir()
|
||||
{
|
||||
return sys_get_temp_dir().'/ChillReportBundle/logs';
|
||||
}
|
||||
}
|
12
Tests/Fixtures/App/config/config.yml
Normal file
12
Tests/Fixtures/App/config/config.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
# config/config.yml
|
||||
framework:
|
||||
secret: Not very secret
|
||||
router: { resource: "%kernel.root_dir%/config/routing.yml" }
|
||||
form: true
|
||||
csrf_protection: true
|
||||
session: ~
|
||||
default_locale: fr
|
||||
translator: { fallback: fr }
|
||||
profiler: { only_exceptions: false }
|
||||
templating: #required for assetic. Remove if not needed
|
||||
engines: ['twig']
|
7
Tests/Fixtures/App/config/config_dev.yml
Normal file
7
Tests/Fixtures/App/config/config_dev.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
imports:
|
||||
- { resource: config.yml } #here we import a config.yml file, this is not required
|
||||
|
||||
framework:
|
||||
test: ~
|
||||
session:
|
||||
storage_id: session.storage.filesystem
|
7
Tests/Fixtures/App/config/config_test.yml
Normal file
7
Tests/Fixtures/App/config/config_test.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
imports:
|
||||
- { resource: config.yml } #here we import a config.yml file, this is not required
|
||||
|
||||
framework:
|
||||
test: ~
|
||||
session:
|
||||
storage_id: session.storage.filesystem
|
1
Tests/Fixtures/App/config/routing.yml
Normal file
1
Tests/Fixtures/App/config/routing.yml
Normal file
@@ -0,0 +1 @@
|
||||
routing.yml
|
27
Tests/Fixtures/App/console
Normal file
27
Tests/Fixtures/App/console
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
|
||||
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
|
||||
//umask(0000);
|
||||
|
||||
set_time_limit(0);
|
||||
|
||||
require_once __DIR__.'/../../bootstrap.php';
|
||||
require_once __DIR__.'/AppKernel.php';
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Input\ArgvInput;
|
||||
use Symfony\Component\Debug\Debug;
|
||||
|
||||
$input = new ArgvInput();
|
||||
$env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
|
||||
$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod';
|
||||
|
||||
if ($debug) {
|
||||
Debug::enable();
|
||||
}
|
||||
|
||||
$kernel = new AppKernel($env, $debug);
|
||||
$application = new Application($kernel);
|
||||
$application->run($input);
|
Reference in New Issue
Block a user