fix bootstrap for unit test

This commit is contained in:
Manuel Raynaud
2013-04-04 12:18:18 +02:00
parent 3b8b787ae1
commit 29c05e53f2
4 changed files with 12 additions and 48 deletions

1
.gitignore vendored
View File

@@ -1,6 +1,7 @@
local/config/build.properties local/config/build.properties
local/config/config_db.php local/config/config_db.php
local/config/build local/config/build
local/config/database.yml
core/vendor core/vendor
local/config/runtime-conf.xml local/config/runtime-conf.xml
cache/* cache/*

View File

@@ -26,7 +26,12 @@ namespace Thelia\Core\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; 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 class RegisterListenersPass implements CompilerPassInterface
{ {
public function process(ContainerBuilder $container) public function process(ContainerBuilder $container)

View File

@@ -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());
}
}

View File

@@ -8,6 +8,10 @@
$env = "test"; $env = "test";
require_once __DIR__ . '/../../../bootstrap.php'; 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");