[2.3] Remove useless tests skips
This commit is contained in:
parent
1d68ad3265
commit
d649befa67
@ -18,10 +18,6 @@ class ContainerAwareEventManagerTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\DependencyInjection\Container')) {
|
|
||||||
$this->markTestSkipped('The "DependencyInjection" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->container = new Container();
|
$this->container = new Container();
|
||||||
$this->evm = new ContainerAwareEventManager($this->container);
|
$this->evm = new ContainerAwareEventManager($this->container);
|
||||||
}
|
}
|
||||||
|
@ -18,17 +18,6 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
|
|
||||||
class DoctrineDataCollectorTest extends \PHPUnit_Framework_TestCase
|
class DoctrineDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Doctrine\DBAL\Platforms\MySqlPlatform')) {
|
|
||||||
$this->markTestSkipped('Doctrine DBAL is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\HttpKernel\HttpKernel')) {
|
|
||||||
$this->markTestSkipped('The "HttpKernel" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testCollectConnections()
|
public function testCollectConnections()
|
||||||
{
|
{
|
||||||
$c = $this->createCollector(array());
|
$c = $this->createCollector(array());
|
||||||
|
@ -16,17 +16,6 @@ use Symfony\Bridge\Doctrine\Tests\Fixtures\ContainerAwareFixture;
|
|||||||
|
|
||||||
class ContainerAwareLoaderTest extends \PHPUnit_Framework_TestCase
|
class ContainerAwareLoaderTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\DependencyInjection\Container')) {
|
|
||||||
$this->markTestSkipped('The "DependencyInjection" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Doctrine\Common\DataFixtures\Loader')) {
|
|
||||||
$this->markTestSkipped('Doctrine Data Fixtures is not available.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testShouldSetContainerOnContainerAwareFixture()
|
public function testShouldSetContainerOnContainerAwareFixture()
|
||||||
{
|
{
|
||||||
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
|
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
|
||||||
|
@ -17,13 +17,6 @@ use Symfony\Component\DependencyInjection\Definition;
|
|||||||
|
|
||||||
class RegisterEventListenersAndSubscribersPassTest extends \PHPUnit_Framework_TestCase
|
class RegisterEventListenersAndSubscribersPassTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\DependencyInjection\Container')) {
|
|
||||||
$this->markTestSkipped('The "DependencyInjection" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \InvalidArgumentException
|
* @expectedException \InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
|
@ -21,21 +21,6 @@ use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
|
|||||||
*/
|
*/
|
||||||
abstract class DoctrineOrmTestCase extends \PHPUnit_Framework_TestCase
|
abstract class DoctrineOrmTestCase extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Doctrine\Common\Version')) {
|
|
||||||
$this->markTestSkipped('Doctrine Common is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Doctrine\DBAL\Platforms\MySqlPlatform')) {
|
|
||||||
$this->markTestSkipped('Doctrine DBAL is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Doctrine\ORM\EntityManager')) {
|
|
||||||
$this->markTestSkipped('Doctrine ORM is not available.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Doctrine\ORM\EntityManager
|
* @return \Doctrine\ORM\EntityManager
|
||||||
*/
|
*/
|
||||||
|
@ -36,22 +36,6 @@ abstract class AbstractEntityChoiceListTest extends AbstractChoiceListTest
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Form\Form')) {
|
|
||||||
$this->markTestSkipped('The "Form" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Doctrine\DBAL\Platforms\MySqlPlatform')) {
|
|
||||||
$this->markTestSkipped('Doctrine DBAL is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Doctrine\Common\Version')) {
|
|
||||||
$this->markTestSkipped('Doctrine Common is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Doctrine\ORM\EntityManager')) {
|
|
||||||
$this->markTestSkipped('Doctrine ORM is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->em = DoctrineTestHelper::createTestEntityManager();
|
$this->em = DoctrineTestHelper::createTestEntityManager();
|
||||||
|
|
||||||
$schemaTool = new SchemaTool($this->em);
|
$schemaTool = new SchemaTool($this->em);
|
||||||
|
@ -36,22 +36,6 @@ class GenericEntityChoiceListTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Form\Form')) {
|
|
||||||
$this->markTestSkipped('The "Form" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Doctrine\DBAL\Platforms\MySqlPlatform')) {
|
|
||||||
$this->markTestSkipped('Doctrine DBAL is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Doctrine\Common\Version')) {
|
|
||||||
$this->markTestSkipped('Doctrine Common is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Doctrine\ORM\EntityManager')) {
|
|
||||||
$this->markTestSkipped('Doctrine ORM is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->em = DoctrineTestHelper::createTestEntityManager();
|
$this->em = DoctrineTestHelper::createTestEntityManager();
|
||||||
|
|
||||||
$schemaTool = new SchemaTool($this->em);
|
$schemaTool = new SchemaTool($this->em);
|
||||||
|
@ -50,22 +50,6 @@ class EntityTypePerformanceTest extends FormPerformanceTestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Form\Form')) {
|
|
||||||
$this->markTestSkipped('The "Form" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Doctrine\DBAL\Platforms\MySqlPlatform')) {
|
|
||||||
$this->markTestSkipped('Doctrine DBAL is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Doctrine\Common\Version')) {
|
|
||||||
$this->markTestSkipped('Doctrine Common is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Doctrine\ORM\EntityManager')) {
|
|
||||||
$this->markTestSkipped('Doctrine ORM is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->em = DoctrineTestHelper::createTestEntityManager();
|
$this->em = DoctrineTestHelper::createTestEntityManager();
|
||||||
|
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
@ -43,22 +43,6 @@ class EntityTypeTest extends TypeTestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Form\Form')) {
|
|
||||||
$this->markTestSkipped('The "Form" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Doctrine\DBAL\Platforms\MySqlPlatform')) {
|
|
||||||
$this->markTestSkipped('Doctrine DBAL is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Doctrine\Common\Version')) {
|
|
||||||
$this->markTestSkipped('Doctrine Common is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Doctrine\ORM\EntityManager')) {
|
|
||||||
$this->markTestSkipped('Doctrine ORM is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->em = DoctrineTestHelper::createTestEntityManager();
|
$this->em = DoctrineTestHelper::createTestEntityManager();
|
||||||
$this->emRegistry = $this->createRegistryMock('default', $this->em);
|
$this->emRegistry = $this->createRegistryMock('default', $this->em);
|
||||||
|
|
||||||
|
@ -20,13 +20,6 @@ use Symfony\Bridge\Doctrine\HttpFoundation\DbalSessionHandler;
|
|||||||
*/
|
*/
|
||||||
class DbalSessionHandlerTest extends \PHPUnit_Framework_TestCase
|
class DbalSessionHandlerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testConstruct()
|
public function testConstruct()
|
||||||
{
|
{
|
||||||
$connection = $this->getMockBuilder('Doctrine\DBAL\Connection')->disableOriginalConstructor()->getMock();
|
$connection = $this->getMockBuilder('Doctrine\DBAL\Connection')->disableOriginalConstructor()->getMock();
|
||||||
|
@ -18,15 +18,6 @@ use Doctrine\ORM\Tools\SchemaTool;
|
|||||||
|
|
||||||
class EntityUserProviderTest extends \PHPUnit_Framework_TestCase
|
class EntityUserProviderTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\Security\Core\SecurityContext')) {
|
|
||||||
$this->markTestSkipped('The "Security" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::setUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testRefreshUserGetsUserByPrimaryKey()
|
public function testRefreshUserGetsUserByPrimaryKey()
|
||||||
{
|
{
|
||||||
$em = DoctrineTestHelper::createTestEntityManager();
|
$em = DoctrineTestHelper::createTestEntityManager();
|
||||||
|
@ -18,13 +18,6 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
|
|||||||
|
|
||||||
class WebProcessorTest extends \PHPUnit_Framework_TestCase
|
class WebProcessorTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Monolog\\Logger')) {
|
|
||||||
$this->markTestSkipped('Monolog is not available.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testUsesRequestServerData()
|
public function testUsesRequestServerData()
|
||||||
{
|
{
|
||||||
$server = array(
|
$server = array(
|
||||||
|
@ -18,13 +18,6 @@ use Symfony\Bridge\Propel1\Tests\Propel1TestCase;
|
|||||||
|
|
||||||
class PropelDataCollectorTest extends Propel1TestCase
|
class PropelDataCollectorTest extends Propel1TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testCollectWithoutData()
|
public function testCollectWithoutData()
|
||||||
{
|
{
|
||||||
$c = $this->createCollector(array());
|
$c = $this->createCollector(array());
|
||||||
|
@ -21,23 +21,6 @@ class CompatModelChoiceListTest extends AbstractChoiceListTest
|
|||||||
protected $item3;
|
protected $item3;
|
||||||
protected $item4;
|
protected $item4;
|
||||||
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
if (!class_exists('\Propel')) {
|
|
||||||
self::markTestSkipped('Propel is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\Form\Form')) {
|
|
||||||
self::markTestSkipped('The "Form" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccessor')) {
|
|
||||||
self::markTestSkipped('The "PropertyAccessor" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::setUpBeforeClass();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testGetChoicesForValues()
|
public function testGetChoicesForValues()
|
||||||
{
|
{
|
||||||
$this->query
|
$this->query
|
||||||
|
@ -22,19 +22,6 @@ class ModelChoiceListTest extends Propel1TestCase
|
|||||||
{
|
{
|
||||||
const ITEM_CLASS = '\Symfony\Bridge\Propel1\Tests\Fixtures\Item';
|
const ITEM_CLASS = '\Symfony\Bridge\Propel1\Tests\Fixtures\Item';
|
||||||
|
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
parent::setUpBeforeClass();
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\Form\Form')) {
|
|
||||||
self::markTestSkipped('The "Form" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccessor')) {
|
|
||||||
self::markTestSkipped('The "PropertyAccessor" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
ItemQuery::$result = array();
|
ItemQuery::$result = array();
|
||||||
|
@ -20,12 +20,6 @@ class CollectionToArrayTransformerTest extends Propel1TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Form\Form')) {
|
|
||||||
$this->markTestSkipped('The "Form" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::setUp();
|
|
||||||
|
|
||||||
$this->transformer = new CollectionToArrayTransformer();
|
$this->transformer = new CollectionToArrayTransformer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,10 +13,4 @@ namespace Symfony\Bridge\Propel1\Tests;
|
|||||||
|
|
||||||
abstract class Propel1TestCase extends \PHPUnit_Framework_TestCase
|
abstract class Propel1TestCase extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
public static function setUpBeforeClass()
|
|
||||||
{
|
|
||||||
if (!class_exists('\Propel')) {
|
|
||||||
self::markTestSkipped('Propel is not available.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -18,19 +18,6 @@ use Symfony\Component\HttpKernel\Fragment\FragmentHandler;
|
|||||||
|
|
||||||
class HttpKernelExtensionTest extends TestCase
|
class HttpKernelExtensionTest extends TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
parent::setUp();
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\HttpKernel\HttpKernel')) {
|
|
||||||
$this->markTestSkipped('The "HttpKernel" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Twig_Environment')) {
|
|
||||||
$this->markTestSkipped('Twig is not available.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \Twig_Error_Runtime
|
* @expectedException \Twig_Error_Runtime
|
||||||
*/
|
*/
|
||||||
|
@ -16,15 +16,6 @@ use Symfony\Bridge\Twig\Tests\TestCase;
|
|||||||
|
|
||||||
class RoutingExtensionTest extends TestCase
|
class RoutingExtensionTest extends TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
parent::setUp();
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\Routing\Route')) {
|
|
||||||
$this->markTestSkipped('The "Routing" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider getEscapingTemplates
|
* @dataProvider getEscapingTemplates
|
||||||
*/
|
*/
|
||||||
|
@ -19,19 +19,6 @@ use Symfony\Bridge\Twig\Tests\TestCase;
|
|||||||
|
|
||||||
class TranslationExtensionTest extends TestCase
|
class TranslationExtensionTest extends TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
parent::setUp();
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\Translation\Translator')) {
|
|
||||||
$this->markTestSkipped('The "Translation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Twig_Environment')) {
|
|
||||||
$this->markTestSkipped('Twig is not available.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testEscaping()
|
public function testEscaping()
|
||||||
{
|
{
|
||||||
$output = $this->getTemplate('{% trans %}Percent: %value%%% (%msg%){% endtrans %}')->render(array('value' => 12, 'msg' => 'approx.'));
|
$output = $this->getTemplate('{% trans %}Percent: %value%%% (%msg%){% endtrans %}')->render(array('value' => 12, 'msg' => 'approx.'));
|
||||||
|
@ -13,10 +13,4 @@ namespace Symfony\Bridge\Twig\Tests;
|
|||||||
|
|
||||||
abstract class TestCase extends \PHPUnit_Framework_TestCase
|
abstract class TestCase extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Twig_Environment')) {
|
|
||||||
$this->markTestSkipped('Twig is not available.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -18,13 +18,6 @@ use Symfony\Bridge\Twig\Tests\TestCase;
|
|||||||
|
|
||||||
class TwigExtractorTest extends TestCase
|
class TwigExtractorTest extends TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\Translation\Translator')) {
|
|
||||||
$this->markTestSkipped('The "Translation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider getExtractData
|
* @dataProvider getExtractData
|
||||||
*/
|
*/
|
||||||
|
@ -235,10 +235,6 @@ abstract class FrameworkExtensionTest extends TestCase
|
|||||||
|
|
||||||
public function testAnnotations()
|
public function testAnnotations()
|
||||||
{
|
{
|
||||||
if (!class_exists('Doctrine\\Common\\Version')) {
|
|
||||||
$this->markTestSkipped('Doctrine is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = $this->createContainerFromFile('full');
|
$container = $this->createContainerFromFile('full');
|
||||||
|
|
||||||
$this->assertEquals($container->getParameter('kernel.cache_dir').'/annotations', $container->getDefinition('annotations.file_cache_reader')->getArgument(1));
|
$this->assertEquals($container->getParameter('kernel.cache_dir').'/annotations', $container->getDefinition('annotations.file_cache_reader')->getArgument(1));
|
||||||
|
@ -23,15 +23,6 @@ class WebTestCase extends BaseWebTestCase
|
|||||||
self::assertEquals('http://localhost'.$location, $response->headers->get('Location'));
|
self::assertEquals('http://localhost'.$location, $response->headers->get('Location'));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Twig_Environment')) {
|
|
||||||
$this->markTestSkipped('Twig is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::setUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function deleteTmpDir($testCase)
|
protected function deleteTmpDir($testCase)
|
||||||
{
|
{
|
||||||
if (!file_exists($dir = sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$testCase)) {
|
if (!file_exists($dir = sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$testCase)) {
|
||||||
|
@ -27,19 +27,6 @@ class FormHelperDivLayoutTest extends AbstractDivLayoutTest
|
|||||||
*/
|
*/
|
||||||
protected $engine;
|
protected $engine;
|
||||||
|
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper')) {
|
|
||||||
$this->markTestSkipped('The "FrameworkBundle" is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\Templating\PhpEngine')) {
|
|
||||||
$this->markTestSkipped('The "Templating" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::setUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getExtensions()
|
protected function getExtensions()
|
||||||
{
|
{
|
||||||
// should be moved to the Form component once absolute file paths are supported
|
// should be moved to the Form component once absolute file paths are supported
|
||||||
|
@ -27,19 +27,6 @@ class FormHelperTableLayoutTest extends AbstractTableLayoutTest
|
|||||||
*/
|
*/
|
||||||
protected $engine;
|
protected $engine;
|
||||||
|
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Bundle\FrameworkBundle\Templating\Helper\TranslatorHelper')) {
|
|
||||||
$this->markTestSkipped('The "FrameworkBundle" is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\Templating\PhpEngine')) {
|
|
||||||
$this->markTestSkipped('The "Templating" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::setUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function getExtensions()
|
protected function getExtensions()
|
||||||
{
|
{
|
||||||
// should be moved to the Form component once absolute file paths are supported
|
// should be moved to the Form component once absolute file paths are supported
|
||||||
|
@ -23,15 +23,6 @@ class WebTestCase extends BaseWebTestCase
|
|||||||
self::assertEquals('http://localhost'.$location, $response->headers->get('Location'));
|
self::assertEquals('http://localhost'.$location, $response->headers->get('Location'));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Twig_Environment')) {
|
|
||||||
$this->markTestSkipped('Twig is not available.');
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::setUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function deleteTmpDir($testCase)
|
protected function deleteTmpDir($testCase)
|
||||||
{
|
{
|
||||||
if (!file_exists($dir = sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$testCase)) {
|
if (!file_exists($dir = sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$testCase)) {
|
||||||
|
@ -13,10 +13,4 @@ namespace Symfony\Bundle\TwigBundle\Tests;
|
|||||||
|
|
||||||
class TestCase extends \PHPUnit_Framework_TestCase
|
class TestCase extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Twig_Environment')) {
|
|
||||||
$this->markTestSkipped('Twig is not available.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -13,10 +13,4 @@ namespace Symfony\Bundle\WebProfilerBundle\Tests;
|
|||||||
|
|
||||||
class TestCase extends \PHPUnit_Framework_TestCase
|
class TestCase extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Twig_Environment')) {
|
|
||||||
$this->markTestSkipped('Twig is not available.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -268,14 +268,6 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testClick()
|
public function testClick()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\DomCrawler\Crawler')) {
|
|
||||||
$this->markTestSkipped('The "DomCrawler" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\CssSelector\CssSelector')) {
|
|
||||||
$this->markTestSkipped('The "CssSelector" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$client = new TestClient();
|
$client = new TestClient();
|
||||||
$client->setNextResponse(new Response('<html><a href="/foo">foo</a></html>'));
|
$client->setNextResponse(new Response('<html><a href="/foo">foo</a></html>'));
|
||||||
$crawler = $client->request('GET', 'http://www.example.com/foo/foobar');
|
$crawler = $client->request('GET', 'http://www.example.com/foo/foobar');
|
||||||
@ -287,14 +279,6 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testClickForm()
|
public function testClickForm()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\DomCrawler\Crawler')) {
|
|
||||||
$this->markTestSkipped('The "DomCrawler" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\CssSelector\CssSelector')) {
|
|
||||||
$this->markTestSkipped('The "CssSelector" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$client = new TestClient();
|
$client = new TestClient();
|
||||||
$client->setNextResponse(new Response('<html><form action="/foo"><input type="submit" /></form></html>'));
|
$client->setNextResponse(new Response('<html><form action="/foo"><input type="submit" /></form></html>'));
|
||||||
$crawler = $client->request('GET', 'http://www.example.com/foo/foobar');
|
$crawler = $client->request('GET', 'http://www.example.com/foo/foobar');
|
||||||
@ -306,14 +290,6 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testSubmit()
|
public function testSubmit()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\DomCrawler\Crawler')) {
|
|
||||||
$this->markTestSkipped('The "DomCrawler" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\CssSelector\CssSelector')) {
|
|
||||||
$this->markTestSkipped('The "CssSelector" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$client = new TestClient();
|
$client = new TestClient();
|
||||||
$client->setNextResponse(new Response('<html><form action="/foo"><input type="submit" /></form></html>'));
|
$client->setNextResponse(new Response('<html><form action="/foo"><input type="submit" /></form></html>'));
|
||||||
$crawler = $client->request('GET', 'http://www.example.com/foo/foobar');
|
$crawler = $client->request('GET', 'http://www.example.com/foo/foobar');
|
||||||
@ -325,14 +301,6 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testSubmitPreserveAuth()
|
public function testSubmitPreserveAuth()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\DomCrawler\Crawler')) {
|
|
||||||
$this->markTestSkipped('The "DomCrawler" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\CssSelector\CssSelector')) {
|
|
||||||
$this->markTestSkipped('The "CssSelector" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$client = new TestClient(array('PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => 'bar'));
|
$client = new TestClient(array('PHP_AUTH_USER' => 'foo', 'PHP_AUTH_PW' => 'bar'));
|
||||||
$client->setNextResponse(new Response('<html><form action="/foo"><input type="submit" /></form></html>'));
|
$client->setNextResponse(new Response('<html><form action="/foo"><input type="submit" /></form></html>'));
|
||||||
$crawler = $client->request('GET', 'http://www.example.com/foo/foobar');
|
$crawler = $client->request('GET', 'http://www.example.com/foo/foobar');
|
||||||
@ -581,10 +549,6 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testInsulatedRequests()
|
public function testInsulatedRequests()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Process\Process')) {
|
|
||||||
$this->markTestSkipped('The "Process" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$client = new TestClient();
|
$client = new TestClient();
|
||||||
$client->insulate();
|
$client->insulate();
|
||||||
$client->setNextScript("new Symfony\Component\BrowserKit\Response('foobar')");
|
$client->setNextScript("new Symfony\Component\BrowserKit\Response('foobar')");
|
||||||
|
@ -120,10 +120,6 @@ class ClassMapGeneratorTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testCreateMapFinderSupport()
|
public function testCreateMapFinderSupport()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\\Component\\Finder\\Finder')) {
|
|
||||||
$this->markTestSkipped('Finder component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$finder = new \Symfony\Component\Finder\Finder();
|
$finder = new \Symfony\Component\Finder\Finder();
|
||||||
$finder->files()->in(__DIR__.'/Fixtures/beta/NamespaceCollision');
|
$finder->files()->in(__DIR__.'/Fixtures/beta/NamespaceCollision');
|
||||||
|
|
||||||
|
@ -769,10 +769,6 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testRunWithDispatcher()
|
public function testRunWithDispatcher()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$application = new Application();
|
$application = new Application();
|
||||||
$application->setAutoExit(false);
|
$application->setAutoExit(false);
|
||||||
$application->setDispatcher($this->getDispatcher());
|
$application->setDispatcher($this->getDispatcher());
|
||||||
@ -792,10 +788,6 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testRunWithExceptionAndDispatcher()
|
public function testRunWithExceptionAndDispatcher()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$application = new Application();
|
$application = new Application();
|
||||||
$application->setDispatcher($this->getDispatcher());
|
$application->setDispatcher($this->getDispatcher());
|
||||||
$application->setAutoExit(false);
|
$application->setAutoExit(false);
|
||||||
@ -811,10 +803,6 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testRunDispatchesAllEventsWithException()
|
public function testRunDispatchesAllEventsWithException()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$application = new Application();
|
$application = new Application();
|
||||||
$application->setDispatcher($this->getDispatcher());
|
$application->setDispatcher($this->getDispatcher());
|
||||||
$application->setAutoExit(false);
|
$application->setAutoExit(false);
|
||||||
|
@ -17,13 +17,6 @@ use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
|
|||||||
|
|
||||||
class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
|
class ExceptionHandlerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testDebug()
|
public function testDebug()
|
||||||
{
|
{
|
||||||
$handler = new ExceptionHandler(false);
|
$handler = new ExceptionHandler(false);
|
||||||
|
@ -498,10 +498,6 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testAddObjectResource()
|
public function testAddObjectResource()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Config\Resource\FileResource')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
|
|
||||||
$container->setResourceTracking(false);
|
$container->setResourceTracking(false);
|
||||||
@ -528,10 +524,6 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testAddClassResource()
|
public function testAddClassResource()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Config\Resource\FileResource')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
|
|
||||||
$container->setResourceTracking(false);
|
$container->setResourceTracking(false);
|
||||||
@ -558,10 +550,6 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testCompilesClassDefinitionsOfLazyServices()
|
public function testCompilesClassDefinitionsOfLazyServices()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Config\Resource\FileResource')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
|
|
||||||
$this->assertEmpty($container->getResources(), 'No resources get registered without resource tracking');
|
$this->assertEmpty($container->getResources(), 'No resources get registered without resource tracking');
|
||||||
@ -588,10 +576,6 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testResources()
|
public function testResources()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Config\Resource\FileResource')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
$container->addResource($a = new FileResource(__DIR__.'/Fixtures/xml/services1.xml'));
|
$container->addResource($a = new FileResource(__DIR__.'/Fixtures/xml/services1.xml'));
|
||||||
$container->addResource($b = new FileResource(__DIR__.'/Fixtures/xml/services2.xml'));
|
$container->addResource($b = new FileResource(__DIR__.'/Fixtures/xml/services2.xml'));
|
||||||
@ -682,10 +666,6 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testThrowsExceptionWhenAddServiceOnAFrozenContainer()
|
public function testThrowsExceptionWhenAddServiceOnAFrozenContainer()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Config\Resource\FileResource')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
$container->compile();
|
$container->compile();
|
||||||
$container->set('a', new \stdClass());
|
$container->set('a', new \stdClass());
|
||||||
@ -693,10 +673,6 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testNoExceptionWhenSetSyntheticServiceOnAFrozenContainer()
|
public function testNoExceptionWhenSetSyntheticServiceOnAFrozenContainer()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Config\Resource\FileResource')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
$def = new Definition('stdClass');
|
$def = new Definition('stdClass');
|
||||||
$def->setSynthetic(true);
|
$def->setSynthetic(true);
|
||||||
|
@ -18,13 +18,6 @@ class CrossCheckTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
protected static $fixturesPath;
|
protected static $fixturesPath;
|
||||||
|
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\Config\Loader\Loader')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function setUpBeforeClass()
|
public static function setUpBeforeClass()
|
||||||
{
|
{
|
||||||
self::$fixturesPath = __DIR__.'/Fixtures/';
|
self::$fixturesPath = __DIR__.'/Fixtures/';
|
||||||
|
@ -18,13 +18,6 @@ class YamlDumperTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
protected static $fixturesPath;
|
protected static $fixturesPath;
|
||||||
|
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\Yaml\Yaml')) {
|
|
||||||
$this->markTestSkipped('The "Yaml" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function setUpBeforeClass()
|
public static function setUpBeforeClass()
|
||||||
{
|
{
|
||||||
self::$fixturesPath = realpath(__DIR__.'/../Fixtures/');
|
self::$fixturesPath = realpath(__DIR__.'/../Fixtures/');
|
||||||
|
@ -16,13 +16,6 @@ use Symfony\Component\DependencyInjection\Loader\ClosureLoader;
|
|||||||
|
|
||||||
class ClosureLoaderTest extends \PHPUnit_Framework_TestCase
|
class ClosureLoaderTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\Config\Loader\Loader')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers Symfony\Component\DependencyInjection\Loader\ClosureLoader::supports
|
* @covers Symfony\Component\DependencyInjection\Loader\ClosureLoader::supports
|
||||||
*/
|
*/
|
||||||
|
@ -29,10 +29,6 @@ class IniFileLoaderTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Config\Loader\Loader')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->container = new ContainerBuilder();
|
$this->container = new ContainerBuilder();
|
||||||
$this->loader = new IniFileLoader($this->container, new FileLocator(self::$fixturesPath.'/ini'));
|
$this->loader = new IniFileLoader($this->container, new FileLocator(self::$fixturesPath.'/ini'));
|
||||||
}
|
}
|
||||||
|
@ -18,13 +18,6 @@ use Symfony\Component\Config\FileLocator;
|
|||||||
|
|
||||||
class PhpFileLoaderTest extends \PHPUnit_Framework_TestCase
|
class PhpFileLoaderTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\Config\Loader\Loader')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers Symfony\Component\DependencyInjection\Loader\PhpFileLoader::supports
|
* @covers Symfony\Component\DependencyInjection\Loader\PhpFileLoader::supports
|
||||||
*/
|
*/
|
||||||
|
@ -25,13 +25,6 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
protected static $fixturesPath;
|
protected static $fixturesPath;
|
||||||
|
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\Config\Loader\Loader')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function setUpBeforeClass()
|
public static function setUpBeforeClass()
|
||||||
{
|
{
|
||||||
self::$fixturesPath = realpath(__DIR__.'/../Fixtures/');
|
self::$fixturesPath = realpath(__DIR__.'/../Fixtures/');
|
||||||
@ -104,10 +97,6 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLoadImports()
|
public function testLoadImports()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Yaml\Yaml')) {
|
|
||||||
$this->markTestSkipped('The "Yaml" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
$resolver = new LoaderResolver(array(
|
$resolver = new LoaderResolver(array(
|
||||||
new IniFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')),
|
new IniFileLoader($container, new FileLocator(self::$fixturesPath.'/xml')),
|
||||||
|
@ -25,17 +25,6 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
protected static $fixturesPath;
|
protected static $fixturesPath;
|
||||||
|
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\Config\Loader\Loader')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\Yaml\Yaml')) {
|
|
||||||
$this->markTestSkipped('The "Yaml" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function setUpBeforeClass()
|
public static function setUpBeforeClass()
|
||||||
{
|
{
|
||||||
self::$fixturesPath = realpath(__DIR__.'/../Fixtures/');
|
self::$fixturesPath = realpath(__DIR__.'/../Fixtures/');
|
||||||
|
@ -515,10 +515,6 @@ EOF
|
|||||||
*/
|
*/
|
||||||
public function testFilter()
|
public function testFilter()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\CssSelector\CssSelector')) {
|
|
||||||
$this->markTestSkipped('The "CssSelector" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$crawler = $this->createTestCrawler();
|
$crawler = $this->createTestCrawler();
|
||||||
$this->assertNotSame($crawler, $crawler->filter('li'), '->filter() returns a new instance of a crawler');
|
$this->assertNotSame($crawler, $crawler->filter('li'), '->filter() returns a new instance of a crawler');
|
||||||
$this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->filter() returns a new instance of a crawler');
|
$this->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->filter() returns a new instance of a crawler');
|
||||||
|
@ -19,13 +19,6 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
|||||||
|
|
||||||
class ContainerAwareEventDispatcherTest extends \PHPUnit_Framework_TestCase
|
class ContainerAwareEventDispatcherTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\DependencyInjection\Container')) {
|
|
||||||
$this->markTestSkipped('The "DependencyInjection" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testAddAListenerService()
|
public function testAddAListenerService()
|
||||||
{
|
{
|
||||||
$event = new Event();
|
$event = new Event();
|
||||||
|
@ -26,10 +26,6 @@ abstract class FormIntegrationTestCase extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->factory = Forms::createFormFactoryBuilder()
|
$this->factory = Forms::createFormFactoryBuilder()
|
||||||
->addExtensions($this->getExtensions())
|
->addExtensions($this->getExtensions())
|
||||||
->getFormFactory();
|
->getFormFactory();
|
||||||
|
@ -34,10 +34,6 @@ abstract class AbstractFormTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
// We need an actual dispatcher to use the deprecated
|
// We need an actual dispatcher to use the deprecated
|
||||||
// bindRequest() method
|
// bindRequest() method
|
||||||
$this->dispatcher = new EventDispatcher();
|
$this->dispatcher = new EventDispatcher();
|
||||||
|
@ -583,10 +583,6 @@ class CompoundFormTest extends AbstractFormTest
|
|||||||
*/
|
*/
|
||||||
public function testSubmitPostOrPutRequest($method)
|
public function testSubmitPostOrPutRequest($method)
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$path = tempnam(sys_get_temp_dir(), 'sf2');
|
$path = tempnam(sys_get_temp_dir(), 'sf2');
|
||||||
touch($path);
|
touch($path);
|
||||||
|
|
||||||
@ -635,10 +631,6 @@ class CompoundFormTest extends AbstractFormTest
|
|||||||
*/
|
*/
|
||||||
public function testSubmitPostOrPutRequestWithEmptyRootFormName($method)
|
public function testSubmitPostOrPutRequestWithEmptyRootFormName($method)
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$path = tempnam(sys_get_temp_dir(), 'sf2');
|
$path = tempnam(sys_get_temp_dir(), 'sf2');
|
||||||
touch($path);
|
touch($path);
|
||||||
|
|
||||||
@ -686,10 +678,6 @@ class CompoundFormTest extends AbstractFormTest
|
|||||||
*/
|
*/
|
||||||
public function testSubmitPostOrPutRequestWithSingleChildForm($method)
|
public function testSubmitPostOrPutRequestWithSingleChildForm($method)
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$path = tempnam(sys_get_temp_dir(), 'sf2');
|
$path = tempnam(sys_get_temp_dir(), 'sf2');
|
||||||
touch($path);
|
touch($path);
|
||||||
|
|
||||||
@ -726,10 +714,6 @@ class CompoundFormTest extends AbstractFormTest
|
|||||||
*/
|
*/
|
||||||
public function testSubmitPostOrPutRequestWithSingleChildFormUploadedFile($method)
|
public function testSubmitPostOrPutRequestWithSingleChildFormUploadedFile($method)
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$path = tempnam(sys_get_temp_dir(), 'sf2');
|
$path = tempnam(sys_get_temp_dir(), 'sf2');
|
||||||
touch($path);
|
touch($path);
|
||||||
|
|
||||||
@ -755,10 +739,6 @@ class CompoundFormTest extends AbstractFormTest
|
|||||||
|
|
||||||
public function testSubmitGetRequest()
|
public function testSubmitGetRequest()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$values = array(
|
$values = array(
|
||||||
'author' => array(
|
'author' => array(
|
||||||
'firstName' => 'Bernhard',
|
'firstName' => 'Bernhard',
|
||||||
@ -787,10 +767,6 @@ class CompoundFormTest extends AbstractFormTest
|
|||||||
|
|
||||||
public function testSubmitGetRequestWithEmptyRootFormName()
|
public function testSubmitGetRequestWithEmptyRootFormName()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$values = array(
|
$values = array(
|
||||||
'firstName' => 'Bernhard',
|
'firstName' => 'Bernhard',
|
||||||
'lastName' => 'Schussek',
|
'lastName' => 'Schussek',
|
||||||
|
@ -34,14 +34,6 @@ class PropertyPathMapperTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\Event')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccess')) {
|
|
||||||
$this->markTestSkipped('The "PropertyAccess" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
||||||
$this->propertyAccessor = $this->getMock('Symfony\Component\PropertyAccess\PropertyAccessorInterface');
|
$this->propertyAccessor = $this->getMock('Symfony\Component\PropertyAccess\PropertyAccessorInterface');
|
||||||
$this->mapper = new PropertyPathMapper($this->propertyAccessor);
|
$this->mapper = new PropertyPathMapper($this->propertyAccessor);
|
||||||
|
@ -21,10 +21,6 @@ class FixRadioInputListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
$this->choiceList = new SimpleChoiceList(array('' => 'Empty', 0 => 'A', 1 => 'B'));
|
$this->choiceList = new SimpleChoiceList(array('' => 'Empty', 0 => 'A', 1 => 'B'));
|
||||||
|
@ -16,13 +16,6 @@ use Symfony\Component\Form\Extension\Core\EventListener\FixUrlProtocolListener;
|
|||||||
|
|
||||||
class FixUrlProtocolListenerTest extends \PHPUnit_Framework_TestCase
|
class FixUrlProtocolListenerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testFixHttpUrl()
|
public function testFixHttpUrl()
|
||||||
{
|
{
|
||||||
$data = "www.symfony.com";
|
$data = "www.symfony.com";
|
||||||
|
@ -22,10 +22,6 @@ abstract class MergeCollectionListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
||||||
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
|
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
|
||||||
$this->form = $this->getForm('axes');
|
$this->form = $this->getForm('axes');
|
||||||
|
@ -24,10 +24,6 @@ class ResizeFormListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
||||||
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
|
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
|
||||||
$this->form = $this->getBuilder()
|
$this->form = $this->getBuilder()
|
||||||
|
@ -16,13 +16,6 @@ use Symfony\Component\Form\Extension\Core\EventListener\TrimListener;
|
|||||||
|
|
||||||
class TrimListenerTest extends \PHPUnit_Framework_TestCase
|
class TrimListenerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testTrim()
|
public function testTrim()
|
||||||
{
|
{
|
||||||
$data = " Foo! ";
|
$data = " Foo! ";
|
||||||
|
@ -20,10 +20,6 @@ class SessionCsrfProviderTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Session\Session')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->session = $this->getMock(
|
$this->session = $this->getMock(
|
||||||
'Symfony\Component\HttpFoundation\Session\Session',
|
'Symfony\Component\HttpFoundation\Session\Session',
|
||||||
array(),
|
array(),
|
||||||
|
@ -23,10 +23,6 @@ class CsrfValidationListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
||||||
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
|
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
|
||||||
$this->csrfProvider = $this->getMock('Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface');
|
$this->csrfProvider = $this->getMock('Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface');
|
||||||
|
@ -87,10 +87,6 @@ class LegacyBindRequestListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testSubmitRequest($method)
|
public function testSubmitRequest($method)
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$values = array('author' => $this->values);
|
$values = array('author' => $this->values);
|
||||||
$files = array('author' => $this->filesNested);
|
$files = array('author' => $this->filesNested);
|
||||||
$request = new Request(array(), $values, array(), array(), $files, array(
|
$request = new Request(array(), $values, array(), array(), $files, array(
|
||||||
@ -116,10 +112,6 @@ class LegacyBindRequestListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testSubmitRequestWithEmptyName($method)
|
public function testSubmitRequestWithEmptyName($method)
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$request = new Request(array(), $this->values, array(), array(), $this->filesPlain, array(
|
$request = new Request(array(), $this->values, array(), array(), $this->filesPlain, array(
|
||||||
'REQUEST_METHOD' => $method,
|
'REQUEST_METHOD' => $method,
|
||||||
));
|
));
|
||||||
@ -143,10 +135,6 @@ class LegacyBindRequestListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testSubmitEmptyRequestToCompoundForm($method)
|
public function testSubmitEmptyRequestToCompoundForm($method)
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$request = new Request(array(), array(), array(), array(), array(), array(
|
$request = new Request(array(), array(), array(), array(), array(), array(
|
||||||
'REQUEST_METHOD' => $method,
|
'REQUEST_METHOD' => $method,
|
||||||
));
|
));
|
||||||
@ -170,10 +158,6 @@ class LegacyBindRequestListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function testSubmitEmptyRequestToSimpleForm($method)
|
public function testSubmitEmptyRequestToSimpleForm($method)
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$request = new Request(array(), array(), array(), array(), array(), array(
|
$request = new Request(array(), array(), array(), array(), array(), array(
|
||||||
'REQUEST_METHOD' => $method,
|
'REQUEST_METHOD' => $method,
|
||||||
));
|
));
|
||||||
@ -193,10 +177,6 @@ class LegacyBindRequestListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testSubmitGetRequest()
|
public function testSubmitGetRequest()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$values = array('author' => $this->values);
|
$values = array('author' => $this->values);
|
||||||
$request = new Request($values, array(), array(), array(), array(), array(
|
$request = new Request($values, array(), array(), array(), array(), array(
|
||||||
'REQUEST_METHOD' => 'GET',
|
'REQUEST_METHOD' => 'GET',
|
||||||
@ -218,10 +198,6 @@ class LegacyBindRequestListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testSubmitGetRequestWithEmptyName()
|
public function testSubmitGetRequestWithEmptyName()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$request = new Request($this->values, array(), array(), array(), array(), array(
|
$request = new Request($this->values, array(), array(), array(), array(), array(
|
||||||
'REQUEST_METHOD' => 'GET',
|
'REQUEST_METHOD' => 'GET',
|
||||||
));
|
));
|
||||||
@ -242,10 +218,6 @@ class LegacyBindRequestListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testSubmitEmptyGetRequestToCompoundForm()
|
public function testSubmitEmptyGetRequestToCompoundForm()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$request = new Request(array(), array(), array(), array(), array(), array(
|
$request = new Request(array(), array(), array(), array(), array(), array(
|
||||||
'REQUEST_METHOD' => 'GET',
|
'REQUEST_METHOD' => 'GET',
|
||||||
));
|
));
|
||||||
@ -265,10 +237,6 @@ class LegacyBindRequestListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testSubmitEmptyGetRequestToSimpleForm()
|
public function testSubmitEmptyGetRequestToSimpleForm()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$request = new Request(array(), array(), array(), array(), array(), array(
|
$request = new Request(array(), array(), array(), array(), array(), array(
|
||||||
'REQUEST_METHOD' => 'GET',
|
'REQUEST_METHOD' => 'GET',
|
||||||
));
|
));
|
||||||
|
@ -53,10 +53,6 @@ class ValidationListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\Event')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
||||||
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
|
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
|
||||||
$this->validator = $this->getMock('Symfony\Component\Validator\ValidatorInterface');
|
$this->validator = $this->getMock('Symfony\Component\Validator\ValidatorInterface');
|
||||||
|
@ -20,10 +20,6 @@ abstract class TypeTestCase extends BaseTypeTestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Validator\Constraint')) {
|
|
||||||
$this->markTestSkipped('The "Validator" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->validator = $this->getMock('Symfony\Component\Validator\ValidatorInterface');
|
$this->validator = $this->getMock('Symfony\Component\Validator\ValidatorInterface');
|
||||||
$metadataFactory = $this->getMock('Symfony\Component\Validator\MetadataFactoryInterface');
|
$metadataFactory = $this->getMock('Symfony\Component\Validator\MetadataFactoryInterface');
|
||||||
$this->validator->expects($this->once())->method('getMetadataFactory')->will($this->returnValue($metadataFactory));
|
$this->validator->expects($this->once())->method('getMetadataFactory')->will($this->returnValue($metadataFactory));
|
||||||
|
@ -50,10 +50,6 @@ class ValidatorTypeGuesserTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Validator\Constraint')) {
|
|
||||||
$this->markTestSkipped('The "Validator" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->metadata = new ClassMetadata(self::TEST_CLASS);
|
$this->metadata = new ClassMetadata(self::TEST_CLASS);
|
||||||
$this->metadataFactory = $this->getMock('Symfony\Component\Validator\MetadataFactoryInterface');
|
$this->metadataFactory = $this->getMock('Symfony\Component\Validator\MetadataFactoryInterface');
|
||||||
$this->metadataFactory->expects($this->any())
|
$this->metadataFactory->expects($this->any())
|
||||||
|
@ -60,10 +60,6 @@ class ViolationMapperTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\Event')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
||||||
$this->mapper = new ViolationMapper();
|
$this->mapper = new ViolationMapper();
|
||||||
$this->message = 'Message';
|
$this->message = 'Message';
|
||||||
|
@ -21,10 +21,6 @@ class FormBuilderTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
||||||
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
|
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
|
||||||
$this->builder = new FormBuilder('name', null, $this->dispatcher, $this->factory);
|
$this->builder = new FormBuilder('name', null, $this->dispatcher, $this->factory);
|
||||||
|
@ -52,10 +52,6 @@ class FormFactoryTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->resolvedTypeFactory = $this->getMock('Symfony\Component\Form\ResolvedFormTypeFactoryInterface');
|
$this->resolvedTypeFactory = $this->getMock('Symfony\Component\Form\ResolvedFormTypeFactoryInterface');
|
||||||
$this->guesser1 = $this->getMock('Symfony\Component\Form\FormTypeGuesserInterface');
|
$this->guesser1 = $this->getMock('Symfony\Component\Form\FormTypeGuesserInterface');
|
||||||
$this->guesser2 = $this->getMock('Symfony\Component\Form\FormTypeGuesserInterface');
|
$this->guesser2 = $this->getMock('Symfony\Component\Form\FormTypeGuesserInterface');
|
||||||
|
@ -38,14 +38,6 @@ class ResolvedFormTypeTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\OptionsResolver\OptionsResolver')) {
|
|
||||||
$this->markTestSkipped('The "OptionsResolver" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
|
||||||
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
|
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
|
||||||
$this->dataMapper = $this->getMock('Symfony\Component\Form\DataMapperInterface');
|
$this->dataMapper = $this->getMock('Symfony\Component\Form\DataMapperInterface');
|
||||||
@ -53,10 +45,6 @@ class ResolvedFormTypeTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testCreateBuilder()
|
public function testCreateBuilder()
|
||||||
{
|
{
|
||||||
if (version_compare(\PHPUnit_Runner_Version::id(), '3.7', '<')) {
|
|
||||||
$this->markTestSkipped('This test requires PHPUnit 3.7.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$parentType = $this->getMockFormType();
|
$parentType = $this->getMockFormType();
|
||||||
$type = $this->getMockFormType();
|
$type = $this->getMockFormType();
|
||||||
$extension1 = $this->getMockFormTypeExtension();
|
$extension1 = $this->getMockFormTypeExtension();
|
||||||
|
@ -19,18 +19,6 @@ class BundleTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
public function testRegisterCommands()
|
public function testRegisterCommands()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Console\Application')) {
|
|
||||||
$this->markTestSkipped('The "Console" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!interface_exists('Symfony\Component\DependencyInjection\ContainerAwareInterface')) {
|
|
||||||
$this->markTestSkipped('The "DependencyInjection" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\Finder\Finder')) {
|
|
||||||
$this->markTestSkipped('The "Finder" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$cmd = new FooCommand();
|
$cmd = new FooCommand();
|
||||||
$app = $this->getMock('Symfony\Component\Console\Application');
|
$app = $this->getMock('Symfony\Component\Console\Application');
|
||||||
$app->expects($this->once())->method('add')->with($this->equalTo($cmd));
|
$app->expects($this->once())->method('add')->with($this->equalTo($cmd));
|
||||||
|
@ -20,13 +20,6 @@ use Symfony\Component\HttpKernel\Tests\Fixtures\TestClient;
|
|||||||
|
|
||||||
class ClientTest extends \PHPUnit_Framework_TestCase
|
class ClientTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\BrowserKit\Client')) {
|
|
||||||
$this->markTestSkipped('The "BrowserKit" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testDoRequest()
|
public function testDoRequest()
|
||||||
{
|
{
|
||||||
$client = new Client(new TestHttpKernel());
|
$client = new Client(new TestHttpKernel());
|
||||||
@ -48,14 +41,6 @@ class ClientTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testGetScript()
|
public function testGetScript()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Process\Process')) {
|
|
||||||
$this->markTestSkipped('The "Process" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\ClassLoader\ClassLoader')) {
|
|
||||||
$this->markTestSkipped('The "ClassLoader" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$client = new TestClient(new TestHttpKernel());
|
$client = new TestClient(new TestHttpKernel());
|
||||||
$client->insulate();
|
$client->insulate();
|
||||||
$client->request('GET', '/');
|
$client->request('GET', '/');
|
||||||
|
@ -16,13 +16,6 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
|
|
||||||
class ControllerResolverTest extends \PHPUnit_Framework_TestCase
|
class ControllerResolverTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testGetControllerWithoutControllerParameter()
|
public function testGetControllerWithoutControllerParameter()
|
||||||
{
|
{
|
||||||
$logger = $this->getMock('Psr\Log\LoggerInterface');
|
$logger = $this->getMock('Psr\Log\LoggerInterface');
|
||||||
|
@ -19,13 +19,6 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
|
|
||||||
class ConfigDataCollectorTest extends \PHPUnit_Framework_TestCase
|
class ConfigDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testCollect()
|
public function testCollect()
|
||||||
{
|
{
|
||||||
$kernel = new KernelForTest('test', true);
|
$kernel = new KernelForTest('test', true);
|
||||||
|
@ -18,13 +18,6 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
|
|
||||||
class ExceptionDataCollectorTest extends \PHPUnit_Framework_TestCase
|
class ExceptionDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testCollect()
|
public function testCollect()
|
||||||
{
|
{
|
||||||
$e = new \Exception('foo', 500);
|
$e = new \Exception('foo', 500);
|
||||||
|
@ -18,13 +18,6 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
|
|
||||||
class LoggerDataCollectorTest extends \PHPUnit_Framework_TestCase
|
class LoggerDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider getCollectTestData
|
* @dataProvider getCollectTestData
|
||||||
*/
|
*/
|
||||||
|
@ -17,13 +17,6 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
|
|
||||||
class MemoryDataCollectorTest extends \PHPUnit_Framework_TestCase
|
class MemoryDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testCollect()
|
public function testCollect()
|
||||||
{
|
{
|
||||||
$collector = new MemoryDataCollector();
|
$collector = new MemoryDataCollector();
|
||||||
|
@ -22,13 +22,6 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
|
|||||||
|
|
||||||
class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase
|
class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider provider
|
* @dataProvider provider
|
||||||
*/
|
*/
|
||||||
|
@ -17,13 +17,6 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
|
|
||||||
class TimeDataCollectorTest extends \PHPUnit_Framework_TestCase
|
class TimeDataCollectorTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testCollect()
|
public function testCollect()
|
||||||
{
|
{
|
||||||
$c = new TimeDataCollector();
|
$c = new TimeDataCollector();
|
||||||
|
@ -22,17 +22,6 @@ use Symfony\Component\Stopwatch\Stopwatch;
|
|||||||
|
|
||||||
class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase
|
class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testAddRemoveListener()
|
public function testAddRemoveListener()
|
||||||
{
|
{
|
||||||
$dispatcher = new EventDispatcher();
|
$dispatcher = new EventDispatcher();
|
||||||
|
@ -19,21 +19,6 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
|
|||||||
|
|
||||||
class ContainerAwareHttpKernelTest extends \PHPUnit_Framework_TestCase
|
class ContainerAwareHttpKernelTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\DependencyInjection\Container')) {
|
|
||||||
$this->markTestSkipped('The "DependencyInjection" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider getProviderTypes
|
* @dataProvider getProviderTypes
|
||||||
*/
|
*/
|
||||||
|
@ -15,17 +15,6 @@ use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfiguration
|
|||||||
|
|
||||||
class MergeExtensionConfigurationPassTest extends \PHPUnit_Framework_TestCase
|
class MergeExtensionConfigurationPassTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\DependencyInjection\Container')) {
|
|
||||||
$this->markTestSkipped('The "DependencyInjection" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\Config\FileLocator')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testAutoloadMainExtension()
|
public function testAutoloadMainExtension()
|
||||||
{
|
{
|
||||||
$container = $this->getMock(
|
$container = $this->getMock(
|
||||||
|
@ -22,13 +22,6 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
|
|||||||
|
|
||||||
class EsiListenerTest extends \PHPUnit_Framework_TestCase
|
class EsiListenerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testFilterDoesNothingForSubRequests()
|
public function testFilterDoesNothingForSubRequests()
|
||||||
{
|
{
|
||||||
$dispatcher = new EventDispatcher();
|
$dispatcher = new EventDispatcher();
|
||||||
|
@ -26,17 +26,6 @@ use Symfony\Component\HttpKernel\Tests\Logger;
|
|||||||
*/
|
*/
|
||||||
class ExceptionListenerTest extends \PHPUnit_Framework_TestCase
|
class ExceptionListenerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testConstruct()
|
public function testConstruct()
|
||||||
{
|
{
|
||||||
$logger = new TestLogger();
|
$logger = new TestLogger();
|
||||||
|
@ -19,13 +19,6 @@ use Symfony\Component\HttpKernel\UriSigner;
|
|||||||
|
|
||||||
class FragmentListenerTest extends \PHPUnit_Framework_TestCase
|
class FragmentListenerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testOnlyTriggeredOnFragmentRoute()
|
public function testOnlyTriggeredOnFragmentRoute()
|
||||||
{
|
{
|
||||||
$request = Request::create('http://example.com/foo?_path=foo%3Dbar%26_controller%3Dfoo');
|
$request = Request::create('http://example.com/foo?_path=foo%3Dbar%26_controller%3Dfoo');
|
||||||
|
@ -18,13 +18,6 @@ use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
|||||||
|
|
||||||
class LocaleListenerTest extends \PHPUnit_Framework_TestCase
|
class LocaleListenerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testDefaultLocaleWithoutSession()
|
public function testDefaultLocaleWithoutSession()
|
||||||
{
|
{
|
||||||
$listener = new LocaleListener('fr');
|
$listener = new LocaleListener('fr');
|
||||||
@ -50,10 +43,6 @@ class LocaleListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testLocaleSetForRoutingContext()
|
public function testLocaleSetForRoutingContext()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Routing\Router')) {
|
|
||||||
$this->markTestSkipped('The "Routing" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
// the request context is updated
|
// the request context is updated
|
||||||
$context = $this->getMock('Symfony\Component\Routing\RequestContext');
|
$context = $this->getMock('Symfony\Component\Routing\RequestContext');
|
||||||
$context->expects($this->once())->method('setParameter')->with('_locale', 'es');
|
$context->expects($this->once())->method('setParameter')->with('_locale', 'es');
|
||||||
|
@ -27,10 +27,6 @@ class ResponseListenerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->dispatcher = new EventDispatcher();
|
$this->dispatcher = new EventDispatcher();
|
||||||
$listener = new ResponseListener('UTF-8');
|
$listener = new ResponseListener('UTF-8');
|
||||||
$this->dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse'));
|
$this->dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'onKernelResponse'));
|
||||||
|
@ -19,17 +19,6 @@ use Symfony\Component\Routing\RequestContext;
|
|||||||
|
|
||||||
class RouterListenerTest extends \PHPUnit_Framework_TestCase
|
class RouterListenerTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\Routing\Router')) {
|
|
||||||
$this->markTestSkipped('The "Routing" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider getPortData
|
* @dataProvider getPortData
|
||||||
*/
|
*/
|
||||||
|
@ -19,13 +19,6 @@ use Symfony\Component\HttpKernel\UriSigner;
|
|||||||
|
|
||||||
class EsiFragmentRendererTest extends \PHPUnit_Framework_TestCase
|
class EsiFragmentRendererTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testRenderFallbackToInlineStrategyIfNoRequest()
|
public function testRenderFallbackToInlineStrategyIfNoRequest()
|
||||||
{
|
{
|
||||||
$strategy = new EsiFragmentRenderer(new Esi(), $this->getInlineStrategy(true));
|
$strategy = new EsiFragmentRenderer(new Esi(), $this->getInlineStrategy(true));
|
||||||
|
@ -18,13 +18,6 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
|
|
||||||
class HIncludeFragmentRendererTest extends \PHPUnit_Framework_TestCase
|
class HIncludeFragmentRendererTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \LogicException
|
* @expectedException \LogicException
|
||||||
*/
|
*/
|
||||||
|
@ -21,17 +21,6 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
|
|||||||
|
|
||||||
class InlineFragmentRendererTest extends \PHPUnit_Framework_TestCase
|
class InlineFragmentRendererTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testRender()
|
public function testRender()
|
||||||
{
|
{
|
||||||
$strategy = new InlineFragmentRenderer($this->getKernel($this->returnValue(new Response('foo'))));
|
$strategy = new InlineFragmentRenderer($this->getKernel($this->returnValue(new Response('foo'))));
|
||||||
|
@ -17,13 +17,6 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
|
|
||||||
class EsiTest extends \PHPUnit_Framework_TestCase
|
class EsiTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testHasSurrogateEsiCapability()
|
public function testHasSurrogateEsiCapability()
|
||||||
{
|
{
|
||||||
$esi = new Esi();
|
$esi = new Esi();
|
||||||
|
@ -17,19 +17,8 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
|
|
||||||
class HttpCacheTest extends HttpCacheTestCase
|
class HttpCacheTest extends HttpCacheTestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testTerminateDelegatesTerminationOnlyForTerminableInterface()
|
public function testTerminateDelegatesTerminationOnlyForTerminableInterface()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\DependencyInjection\Container')) {
|
|
||||||
$this->markTestSkipped('The "DependencyInjection" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$storeMock = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface')
|
$storeMock = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\HttpCache\\StoreInterface')
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
|
@ -31,10 +31,6 @@ class HttpCacheTestCase extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->kernel = null;
|
$this->kernel = null;
|
||||||
|
|
||||||
$this->cache = null;
|
$this->cache = null;
|
||||||
|
@ -23,10 +23,6 @@ class StoreTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->request = Request::create('/');
|
$this->request = Request::create('/');
|
||||||
$this->response = new Response('hello world', 200, array());
|
$this->response = new Response('hello world', 200, array());
|
||||||
|
|
||||||
|
@ -23,17 +23,6 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
|
|||||||
|
|
||||||
class HttpKernelTest extends \PHPUnit_Framework_TestCase
|
class HttpKernelTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
|
|
||||||
$this->markTestSkipped('The "EventDispatcher" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException \RuntimeException
|
* @expectedException \RuntimeException
|
||||||
*/
|
*/
|
||||||
|
@ -21,13 +21,6 @@ use Symfony\Component\HttpKernel\Tests\Fixtures\FooBarBundle;
|
|||||||
|
|
||||||
class KernelTest extends \PHPUnit_Framework_TestCase
|
class KernelTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\DependencyInjection\Container')) {
|
|
||||||
$this->markTestSkipped('The "DependencyInjection" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testConstructor()
|
public function testConstructor()
|
||||||
{
|
{
|
||||||
$env = 'test_env';
|
$env = 'test_env';
|
||||||
@ -263,11 +256,6 @@ class KernelTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testStripComments()
|
public function testStripComments()
|
||||||
{
|
{
|
||||||
if (!function_exists('token_get_all')) {
|
|
||||||
$this->markTestSkipped('The function token_get_all() is not available.');
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$source = <<<'EOF'
|
$source = <<<'EOF'
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -60,10 +60,6 @@ class ProfilerTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\HttpFoundation\Request')) {
|
|
||||||
$this->markTestSkipped('The "HttpFoundation" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('SQLite3') && (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers()))) {
|
if (!class_exists('SQLite3') && (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers()))) {
|
||||||
$this->markTestSkipped('This test requires SQLite support in your environment');
|
$this->markTestSkipped('This test requires SQLite support in your environment');
|
||||||
}
|
}
|
||||||
|
@ -207,10 +207,6 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testGenerateForRouteWithInvalidOptionalParameterNonStrictWithLogger()
|
public function testGenerateForRouteWithInvalidOptionalParameterNonStrictWithLogger()
|
||||||
{
|
{
|
||||||
if (!interface_exists('Psr\Log\LoggerInterface')) {
|
|
||||||
$this->markTestSkipped('The "psr/log" package is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$routes = $this->getRoutes('test', new Route('/testing/{foo}', array('foo' => '1'), array('foo' => 'd+')));
|
$routes = $this->getRoutes('test', new Route('/testing/{foo}', array('foo' => '1'), array('foo' => 'd+')));
|
||||||
$logger = $this->getMock('Psr\Log\LoggerInterface');
|
$logger = $this->getMock('Psr\Log\LoggerInterface');
|
||||||
$logger->expects($this->once())
|
$logger->expects($this->once())
|
||||||
|
@ -13,13 +13,6 @@ namespace Symfony\Component\Routing\Tests\Loader;
|
|||||||
|
|
||||||
abstract class AbstractAnnotationLoaderTest extends \PHPUnit_Framework_TestCase
|
abstract class AbstractAnnotationLoaderTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Doctrine\\Common\\Version')) {
|
|
||||||
$this->markTestSkipped('Doctrine is not available.');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getReader()
|
public function getReader()
|
||||||
{
|
{
|
||||||
return $this->getMockBuilder('Doctrine\Common\Annotations\Reader')
|
return $this->getMockBuilder('Doctrine\Common\Annotations\Reader')
|
||||||
|
@ -17,13 +17,6 @@ use Symfony\Component\Routing\RouteCollection;
|
|||||||
|
|
||||||
class ClosureLoaderTest extends \PHPUnit_Framework_TestCase
|
class ClosureLoaderTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\Config\FileLocator')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testSupports()
|
public function testSupports()
|
||||||
{
|
{
|
||||||
$loader = new ClosureLoader();
|
$loader = new ClosureLoader();
|
||||||
|
@ -16,13 +16,6 @@ use Symfony\Component\Routing\Loader\PhpFileLoader;
|
|||||||
|
|
||||||
class PhpFileLoaderTest extends \PHPUnit_Framework_TestCase
|
class PhpFileLoaderTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\Config\FileLocator')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testSupports()
|
public function testSupports()
|
||||||
{
|
{
|
||||||
$loader = new PhpFileLoader($this->getMock('Symfony\Component\Config\FileLocator'));
|
$loader = new PhpFileLoader($this->getMock('Symfony\Component\Config\FileLocator'));
|
||||||
|
@ -17,13 +17,6 @@ use Symfony\Component\Routing\Tests\Fixtures\CustomXmlFileLoader;
|
|||||||
|
|
||||||
class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
|
class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\Config\FileLocator')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testSupports()
|
public function testSupports()
|
||||||
{
|
{
|
||||||
$loader = new XmlFileLoader($this->getMock('Symfony\Component\Config\FileLocator'));
|
$loader = new XmlFileLoader($this->getMock('Symfony\Component\Config\FileLocator'));
|
||||||
|
@ -17,17 +17,6 @@ use Symfony\Component\Config\Resource\FileResource;
|
|||||||
|
|
||||||
class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
|
class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
|
||||||
{
|
{
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
if (!class_exists('Symfony\Component\Config\FileLocator')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists('Symfony\Component\Yaml\Yaml')) {
|
|
||||||
$this->markTestSkipped('The "Yaml" component is not available');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function testSupports()
|
public function testSupports()
|
||||||
{
|
{
|
||||||
$loader = new YamlFileLoader($this->getMock('Symfony\Component\Config\FileLocator'));
|
$loader = new YamlFileLoader($this->getMock('Symfony\Component\Config\FileLocator'));
|
||||||
|
@ -103,10 +103,6 @@ class RouteCollectionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testAddCollectionWithResources()
|
public function testAddCollectionWithResources()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Config\Resource\FileResource')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$collection = new RouteCollection();
|
$collection = new RouteCollection();
|
||||||
$collection->addResource($foo = new FileResource(__DIR__.'/Fixtures/foo.xml'));
|
$collection->addResource($foo = new FileResource(__DIR__.'/Fixtures/foo.xml'));
|
||||||
$collection1 = new RouteCollection();
|
$collection1 = new RouteCollection();
|
||||||
@ -178,10 +174,6 @@ class RouteCollectionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
public function testResource()
|
public function testResource()
|
||||||
{
|
{
|
||||||
if (!class_exists('Symfony\Component\Config\Resource\FileResource')) {
|
|
||||||
$this->markTestSkipped('The "Config" component is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
$collection = new RouteCollection();
|
$collection = new RouteCollection();
|
||||||
$collection->addResource($foo = new FileResource(__DIR__.'/Fixtures/foo.xml'));
|
$collection->addResource($foo = new FileResource(__DIR__.'/Fixtures/foo.xml'));
|
||||||
$collection->addResource($bar = new FileResource(__DIR__.'/Fixtures/bar.xml'));
|
$collection->addResource($bar = new FileResource(__DIR__.'/Fixtures/bar.xml'));
|
||||||
|
@ -32,10 +32,6 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Doctrine\DBAL\DriverManager')) {
|
|
||||||
$this->markTestSkipped('The "Doctrine DBAL" library is not available');
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->con = DriverManager::getConnection(array(
|
$this->con = DriverManager::getConnection(array(
|
||||||
'driver' => 'pdo_mysql',
|
'driver' => 'pdo_mysql',
|
||||||
|
@ -141,9 +141,6 @@ class AclProviderTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Doctrine\DBAL\DriverManager')) {
|
|
||||||
$this->markTestSkipped('The Doctrine2 DBAL is required for this test');
|
|
||||||
}
|
|
||||||
if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) {
|
if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) {
|
||||||
self::markTestSkipped('This test requires SQLite support in your environment');
|
self::markTestSkipped('This test requires SQLite support in your environment');
|
||||||
}
|
}
|
||||||
|
@ -483,9 +483,6 @@ class MutableAclProviderTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
if (!class_exists('Doctrine\DBAL\DriverManager')) {
|
|
||||||
$this->markTestSkipped('The Doctrine2 DBAL is required for this test');
|
|
||||||
}
|
|
||||||
if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) {
|
if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) {
|
||||||
self::markTestSkipped('This test requires SQLite support in your environment');
|
self::markTestSkipped('This test requires SQLite support in your environment');
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user