for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Happyr\AutoFallbackTranslationBundle\Tests\Functional\app;
use Happyr\AutoFallbackTranslationBundle\HappyrAutoFallbackTranslationBundle;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpKernel\Kernel;
class AppKernel extends Kernel
{
private $config;
public function __construct($config)
parent::__construct('test', true);
$fs = new Filesystem();
if (!$fs->isAbsolutePath($config)) {
$config = __DIR__.'/config/'.$config;
}
if (!file_exists($config)) {
throw new \RuntimeException(sprintf('The config file "%s" does not exist', $config));
$this->config = $config;
public function registerBundles()
return [
new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new HappyrAutoFallbackTranslationBundle(),
];
public function registerContainerConfiguration(LoaderInterface $loader)
$loader->load($this->config);
public function getCacheDir()
return sys_get_temp_dir().'/HappyrAutoFallbackTranslationBundle';
public function serialize()
return $this->config;
public function unserialize($config)
$this->__construct($config);