mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 23:59:26 +03:00
72 lines
1.7 KiB
PHP
72 lines
1.7 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of the Symfony package.
|
|
*
|
|
* (c) Fabien Potencier <fabien@symfony.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Nelmio\ApiDocBundle\Tests\Functional;
|
|
|
|
use Symfony\Component\Config\Loader\LoaderInterface;
|
|
use Symfony\Component\HttpKernel\Kernel;
|
|
|
|
/**
|
|
* App Test Kernel for functional tests.
|
|
*/
|
|
class AppKernel extends Kernel
|
|
{
|
|
public function __construct($environment, $debug)
|
|
{
|
|
parent::__construct($environment, $debug);
|
|
}
|
|
|
|
public function registerBundles()
|
|
{
|
|
return array(
|
|
new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
|
|
new \Symfony\Bundle\TwigBundle\TwigBundle(),
|
|
new \JMS\SerializerBundle\JMSSerializerBundle($this),
|
|
new \Nelmio\ApiDocBundle\NelmioApiDocBundle(),
|
|
new \Nelmio\ApiDocBundle\Tests\Fixtures\NelmioApiDocTestBundle(),
|
|
);
|
|
}
|
|
|
|
public function init()
|
|
{
|
|
}
|
|
|
|
public function getRootDir()
|
|
{
|
|
return __DIR__;
|
|
}
|
|
|
|
public function getCacheDir()
|
|
{
|
|
return sys_get_temp_dir().'/'.Kernel::VERSION.'/nelmio-api-doc/cache/'.$this->environment;
|
|
}
|
|
|
|
public function getLogDir()
|
|
{
|
|
return sys_get_temp_dir().'/'.Kernel::VERSION.'/nelmio-api-doc/logs';
|
|
}
|
|
|
|
public function registerContainerConfiguration(LoaderInterface $loader)
|
|
{
|
|
$loader->load(__DIR__.'/config/'.$this->environment.'.yml');
|
|
}
|
|
|
|
public function serialize()
|
|
{
|
|
return serialize(array($this->getEnvironment(), $this->isDebug()));
|
|
}
|
|
|
|
public function unserialize($str)
|
|
{
|
|
call_user_func_array(array($this, '__construct'), unserialize($str));
|
|
}
|
|
}
|