propel-bundle/Tests/TestCase.php

48 lines
1.4 KiB
PHP
Raw Normal View History

2010-10-28 14:41:03 +02:00
<?php
2011-08-30 23:29:49 +02:00
/**
* This file is part of the PropelBundle package.
2010-10-28 14:41:03 +02:00
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
2011-08-30 23:29:49 +02:00
*
* @license MIT License
2010-10-28 14:41:03 +02:00
*/
namespace Propel\PropelBundle\Tests;
2010-10-28 14:41:03 +02:00
2011-04-06 01:55:25 +02:00
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
2011-03-25 23:45:10 +01:00
/**
* TestCase
*
2011-08-30 23:29:49 +02:00
* @author William DURAND <william.durand1@gmail.com>
2011-03-25 23:45:10 +01:00
*/
2010-10-28 14:41:03 +02:00
class TestCase extends \PHPUnit_Framework_TestCase
{
public function setUp()
{
if (!file_exists($file = __DIR__.'/../vendor/propel/runtime/lib/Propel.php')) {
2010-10-28 14:41:03 +02:00
$this->markTestSkipped('Propel is not available.');
}
require_once $file;
}
2011-04-06 01:55:25 +02:00
public function getContainer()
{
return new ContainerBuilder(new ParameterBag(array(
'kernel.debug' => false,
2011-04-06 01:55:25 +02:00
)));
}
protected function loadPropelQuickBuilder()
{
require_once __DIR__.'/../vendor/propel/runtime/lib/Propel.php';
require_once __DIR__.'/../vendor/propel/runtime/lib/adapter/DBAdapter.php';
2011-12-14 14:49:39 +01:00
require_once __DIR__.'/../vendor/propel/runtime/lib/adapter/DBSQLite.php';
require_once __DIR__.'/../vendor/propel/runtime/lib/connection/PropelPDO.php';
require_once __DIR__.'/../vendor/propel/generator/lib/util/PropelQuickBuilder.php';
}
2010-10-28 14:41:03 +02:00
}