fix bootstrap for unit test
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
||||
local/config/build.properties
|
||||
local/config/config_db.php
|
||||
local/config/build
|
||||
local/config/database.yml
|
||||
core/vendor
|
||||
local/config/runtime-conf.xml
|
||||
cache/*
|
||||
|
||||
@@ -26,7 +26,12 @@ namespace Thelia\Core\DependencyInjection\Compiler;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
|
||||
|
||||
/**
|
||||
* Class RegisterListenersPass
|
||||
* @package Thelia\Core\DependencyInjection\Compiler
|
||||
*
|
||||
* Source code come from Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RegisterKernelListenersPass class
|
||||
*/
|
||||
class RegisterListenersPass implements CompilerPassInterface
|
||||
{
|
||||
public function process(ContainerBuilder $container)
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
<?php
|
||||
/*************************************************************************************/
|
||||
/* */
|
||||
/* Thelia */
|
||||
/* */
|
||||
/* Copyright (c) OpenStudio */
|
||||
/* email : info@thelia.net */
|
||||
/* web : http://www.thelia.net */
|
||||
/* */
|
||||
/* This program is free software; you can redistribute it and/or modify */
|
||||
/* it under the terms of the GNU General Public License as published by */
|
||||
/* the Free Software Foundation; either version 3 of the License */
|
||||
/* */
|
||||
/* This program is distributed in the hope that it will be useful, */
|
||||
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
|
||||
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
|
||||
/* GNU General Public License for more details. */
|
||||
/* */
|
||||
/* You should have received a copy of the GNU General Public License */
|
||||
/* along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* */
|
||||
/*************************************************************************************/
|
||||
|
||||
namespace Thelia\Tests\Config\Dumper;
|
||||
|
||||
use Thelia\Config\Dumper\TpexConfigDumper;
|
||||
|
||||
|
||||
class TpexConfigDumperTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
static protected $fixturePath;
|
||||
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
self::$fixturePath = realpath(__DIR__ . "/../Fixtures/Dumper/Config");
|
||||
}
|
||||
|
||||
public function testDumpWithEmptyConfig()
|
||||
{
|
||||
$tpexDumper = new TpexConfigDumper(array(), array(), array(), array());
|
||||
|
||||
$this->assertStringEqualsFile(self::$fixturePath . "/Empty.php", $tpexDumper->dump());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,6 +8,10 @@
|
||||
$env = "test";
|
||||
require_once __DIR__ . '/../../../bootstrap.php';
|
||||
|
||||
use Thelia\Core\Thelia;
|
||||
|
||||
$thelia = new Thelia("test", true);
|
||||
|
||||
|
||||
|
||||
|
||||
\Propel::init(THELIA_ROOT . "/core/lib/Thelia/Tests/Db/thelia-conf.php");
|
||||
|
||||
Reference in New Issue
Block a user