deblan.tv/vendor/trinity/src/Trinity/.svn/pristine/f3/f3552b6acd794b772d0ba10f97e968148c518e03.svn-base
2015-03-02 21:57:49 +01:00

38 lines
935 B
Plaintext

<?php
namespace Trinity\Component\Tests;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
class WebTestCase extends BaseWebTestCase
{
private static $application;
public static function setUpBeforeClass()
{
\Propel::disableInstancePooling();
self::runCommand('propel:build --insert-sql');
}
protected static function getApplication()
{
if (null === self::$application) {
$client = static::createClient();
self::$application = new \Symfony\Bundle\FrameworkBundle\Console\Application($client->getKernel());
self::$application->setAutoExit(false);
}
return self::$application;
}
protected static function runCommand($command)
{
$command = sprintf('%s --quiet', $command);
return self::getApplication()->run(new \Symfony\Component\Console\Input\StringInput($command));
}
}