-
Notifications
You must be signed in to change notification settings - Fork 152
/
TestCase.php
47 lines (40 loc) · 1.36 KB
/
TestCase.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/**
* This file is part of the PropelBundle package.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @license MIT License
*/
namespace Propel\PropelBundle\Tests;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
/**
* TestCase
*
* @author William DURAND <william.durand1@gmail.com>
*/
class TestCase extends \PHPUnit_Framework_TestCase
{
public function setUp()
{
if (!file_exists($file = __DIR__.'/../vendor/propel/runtime/lib/Propel.php')) {
$this->markTestSkipped('Propel is not available.');
}
require_once $file;
}
public function getContainer()
{
return new ContainerBuilder(new ParameterBag(array(
'kernel.debug' => false,
)));
}
protected function loadPropelQuickBuilder()
{
require_once __DIR__.'/../vendor/propel/runtime/lib/Propel.php';
require_once __DIR__.'/../vendor/propel/runtime/lib/adapter/DBAdapter.php';
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';
}
}