merged branch fabpot/tests-simplification (PR #8796)

This PR was merged into the master branch.

Discussion
----------

removed deps checks in unit tests

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

As Composer is now widely used in the PHP world, having to run composer install before running the test suite is expected. This also has the nice benefit of removing a bunch of code, making things easier to maintain (there is only one place to declare a dev dependency), and probably more.

see fabpot/Silex#626 where we did the same a while ago for Silex.

Commits
-------

de50621 removed deps checks in unit tests
This commit is contained in:
Fabien Potencier 2013-08-23 17:27:50 +02:00
commit 1602746548
157 changed files with 6 additions and 1418 deletions

View File

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

View File

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

View File

@ -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');

View File

@ -16,13 +16,6 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
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');
}
}
public function testProcessEventListenersWithPriorities() public function testProcessEventListenersWithPriorities()
{ {
$container = $this->createBuilder(); $container = $this->createBuilder();

View File

@ -17,21 +17,6 @@ use Doctrine\ORM\EntityManager;
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 EntityManager * @return EntityManager
*/ */

View File

@ -35,10 +35,6 @@ class EntityChoiceListTest extends DoctrineOrmTestCase
protected function setUp() protected function setUp()
{ {
if (!class_exists('Symfony\Component\Form\Form')) {
$this->markTestSkipped('The "Form" component is not available');
}
parent::setUp(); parent::setUp();
$this->em = $this->createTestEntityManager(); $this->em = $this->createTestEntityManager();

View File

@ -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 = DoctrineOrmTestCase::createTestEntityManager(); $this->em = DoctrineOrmTestCase::createTestEntityManager();
parent::setUp(); parent::setUp();

View File

@ -44,22 +44,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 = DoctrineOrmTestCase::createTestEntityManager(); $this->em = DoctrineOrmTestCase::createTestEntityManager();
$this->emRegistry = $this->createRegistryMock('default', $this->em); $this->emRegistry = $this->createRegistryMock('default', $this->em);

View File

@ -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()
{ {
$this->connection = $this->getMock('Doctrine\DBAL\Driver\Connection'); $this->connection = $this->getMock('Doctrine\DBAL\Driver\Connection');

View File

@ -18,15 +18,6 @@ use Doctrine\ORM\Tools\SchemaTool;
class EntityUserProviderTest extends DoctrineOrmTestCase class EntityUserProviderTest extends DoctrineOrmTestCase
{ {
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 = $this->createTestEntityManager(); $em = $this->createTestEntityManager();

View File

@ -26,19 +26,6 @@ use Doctrine\ORM\Tools\SchemaTool;
class UniqueValidatorTest extends DoctrineOrmTestCase class UniqueValidatorTest extends DoctrineOrmTestCase
{ {
protected function setUp()
{
parent::setUp();
if (!class_exists('Symfony\Component\Security\Core\SecurityContext')) {
$this->markTestSkipped('The "Security" component is not available');
}
if (!class_exists('Symfony\Component\Validator\Constraint')) {
$this->markTestSkipped('The "Validator" component is not available');
}
}
protected function createRegistryMock($entityManagerName, $em) protected function createRegistryMock($entityManagerName, $em)
{ {
$registry = $this->getMock('Doctrine\Common\Persistence\ManagerRegistry'); $registry = $this->getMock('Doctrine\Common\Persistence\ManagerRegistry');

View File

@ -22,13 +22,6 @@ use Symfony\Component\Console\Output\OutputInterface;
*/ */
class ConsoleHandlerTest extends \PHPUnit_Framework_TestCase class ConsoleHandlerTest extends \PHPUnit_Framework_TestCase
{ {
protected function setUp()
{
if (!class_exists('Monolog\\Logger')) {
$this->markTestSkipped('Monolog is not available.');
}
}
public function testConstructor() public function testConstructor()
{ {
$handler = new ConsoleHandler(null, false); $handler = new ConsoleHandler(null, false);

View File

@ -17,13 +17,6 @@ use Symfony\Component\HttpFoundation\Request;
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(

View File

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

View File

@ -21,17 +21,6 @@ class ModelChoiceListTest extends Propel1TestCase
{ {
const ITEM_CLASS = '\Symfony\Bridge\Propel1\Tests\Fixtures\Item'; const ITEM_CLASS = '\Symfony\Bridge\Propel1\Tests\Fixtures\Item';
protected function setUp()
{
if (!class_exists('Symfony\Component\Form\Form')) {
$this->markTestSkipped('The "Form" component is not available');
}
if (!class_exists('Symfony\Component\PropertyAccess\PropertyAccessor')) {
$this->markTestSkipped('The "PropertyAccessor" component is not available');
}
}
public function testEmptyChoicesReturnsEmpty() public function testEmptyChoicesReturnsEmpty()
{ {
$choiceList = new ModelChoiceList( $choiceList = new ModelChoiceList(

View File

@ -21,12 +21,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();
} }

View File

@ -13,10 +13,4 @@ namespace Symfony\Bridge\Propel1\Tests;
abstract class Propel1TestCase extends \PHPUnit_Framework_TestCase abstract class Propel1TestCase extends \PHPUnit_Framework_TestCase
{ {
protected function setUp()
{
if (!class_exists('\Propel')) {
$this->markTestSkipped('Propel is not available.');
}
}
} }

View File

@ -11,20 +11,13 @@
namespace Symfony\Bridge\Twig\Tests\Extension\Fixtures; namespace Symfony\Bridge\Twig\Tests\Extension\Fixtures;
// Preventing autoloader throwing E_FATAL when Twig is now available class StubFilesystemLoader extends \Twig_Loader_Filesystem
if (!class_exists('Twig_Environment')) { {
class StubFilesystemLoader protected function findTemplate($name)
{ {
} // strip away bundle name
} else { $parts = explode(':', $name);
class StubFilesystemLoader extends \Twig_Loader_Filesystem
{
protected function findTemplate($name)
{
// strip away bundle name
$parts = explode(':', $name);
return parent::findTemplate(end($parts)); return parent::findTemplate(end($parts));
}
} }
} }

View File

@ -30,22 +30,6 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest
protected function setUp() protected function setUp()
{ {
if (!class_exists('Symfony\Component\Locale\Locale')) {
$this->markTestSkipped('The "Locale" component is not available');
}
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
$this->markTestSkipped('The "EventDispatcher" component is not available');
}
if (!class_exists('Symfony\Component\Form\Form')) {
$this->markTestSkipped('The "Form" component is not available');
}
if (!class_exists('Twig_Environment')) {
$this->markTestSkipped('Twig is not available.');
}
parent::setUp(); parent::setUp();
$rendererEngine = new TwigRendererEngine(array( $rendererEngine = new TwigRendererEngine(array(

View File

@ -29,22 +29,6 @@ class FormExtensionTableLayoutTest extends AbstractTableLayoutTest
protected function setUp() protected function setUp()
{ {
if (!class_exists('Symfony\Component\Locale\Locale')) {
$this->markTestSkipped('The "Locale" component is not available');
}
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
$this->markTestSkipped('The "EventDispatcher" component is not available');
}
if (!class_exists('Symfony\Component\Form\Form')) {
$this->markTestSkipped('The "Form" component is not available');
}
if (!class_exists('Twig_Environment')) {
$this->markTestSkipped('Twig is not available.');
}
parent::setUp(); parent::setUp();
$rendererEngine = new TwigRendererEngine(array( $rendererEngine = new TwigRendererEngine(array(

View File

@ -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
*/ */

View File

@ -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
*/ */

View File

@ -17,15 +17,6 @@ use Symfony\Bridge\Twig\Tests\TestCase;
class StopwatchExtensionTest extends TestCase class StopwatchExtensionTest extends TestCase
{ {
protected function setUp()
{
parent::setUp();
if (!class_exists('Symfony\Component\Stopwatch\Stopwatch')) {
$this->markTestSkipped('The "Stopwatch" component is not available');
}
}
/** /**
* @expectedException \Twig_Error_Syntax * @expectedException \Twig_Error_Syntax
*/ */

View File

@ -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.'));

View File

@ -16,15 +16,6 @@ use Symfony\Bridge\Twig\Node\FormThemeNode;
class FormThemeTest extends TestCase class FormThemeTest extends TestCase
{ {
protected function setUp()
{
parent::setUp();
if (version_compare(\Twig_Environment::VERSION, '1.5.0', '<')) {
$this->markTestSkipped('Requires Twig version to be at least 1.5.0.');
}
}
public function testConstructor() public function testConstructor()
{ {
$form = new \Twig_Node_Expression_Name('form', 0); $form = new \Twig_Node_Expression_Name('form', 0);

View File

@ -16,15 +16,6 @@ use Symfony\Bridge\Twig\Node\SearchAndRenderBlockNode;
class SearchAndRenderBlockNodeTest extends TestCase class SearchAndRenderBlockNodeTest extends TestCase
{ {
protected function setUp()
{
parent::setUp();
if (version_compare(\Twig_Environment::VERSION, '1.5.0', '<')) {
$this->markTestSkipped('Requires Twig version to be at least 1.5.0.');
}
}
public function testCompileWidget() public function testCompileWidget()
{ {
$arguments = new \Twig_Node(array( $arguments = new \Twig_Node(array(

View File

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

View File

@ -17,15 +17,6 @@ use Symfony\Bridge\Twig\Node\FormThemeNode;
class FormThemeTokenParserTest extends TestCase class FormThemeTokenParserTest extends TestCase
{ {
protected function setUp()
{
parent::setUp();
if (version_compare(\Twig_Environment::VERSION, '1.5.0', '<')) {
$this->markTestSkipped('Requires Twig version to be at least 1.5.0.');
}
}
/** /**
* @dataProvider getTestsForFormTheme * @dataProvider getTestsForFormTheme
*/ */

View File

@ -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
*/ */

View File

@ -234,10 +234,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));

View File

@ -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)) {

View File

@ -29,19 +29,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

View File

@ -29,19 +29,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

View File

@ -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)) {

View File

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

View File

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

View File

@ -238,14 +238,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');
@ -257,14 +249,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');
@ -276,14 +260,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');
@ -295,14 +271,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');
@ -475,10 +443,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')");

View File

@ -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');

View File

@ -757,10 +757,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());
@ -780,10 +776,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);
@ -799,10 +791,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);

View File

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

View File

@ -485,10 +485,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);
@ -515,10 +511,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);
@ -545,10 +537,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');
@ -575,10 +563,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'));
@ -669,10 +653,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());
@ -680,10 +660,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);

View File

@ -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/';

View File

@ -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/');

View File

@ -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
*/ */

View File

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

View File

@ -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
*/ */

View File

@ -27,13 +27,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/');
@ -126,10 +119,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')),

View File

@ -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/');

View File

@ -371,10 +371,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');

View File

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

View File

@ -25,10 +25,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();

View File

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

View File

@ -581,10 +581,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);
@ -633,10 +629,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);
@ -684,10 +676,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);
@ -724,10 +712,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);
@ -753,10 +737,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',
@ -785,10 +765,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',

View File

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

View File

@ -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'));

View File

@ -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";

View File

@ -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');

View File

@ -23,10 +23,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()

View File

@ -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! ";

View File

@ -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(),

View File

@ -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');

View File

@ -86,10 +86,6 @@ class BindRequestListenerTest 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(
@ -115,10 +111,6 @@ class BindRequestListenerTest 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,
)); ));
@ -142,10 +134,6 @@ class BindRequestListenerTest 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,
)); ));
@ -169,10 +157,6 @@ class BindRequestListenerTest 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,
)); ));
@ -192,10 +176,6 @@ class BindRequestListenerTest 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',
@ -217,10 +197,6 @@ class BindRequestListenerTest 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',
)); ));
@ -241,10 +217,6 @@ class BindRequestListenerTest 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',
)); ));
@ -264,10 +236,6 @@ class BindRequestListenerTest 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',
)); ));

View File

@ -49,10 +49,6 @@ class FormValidatorTest 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->serverParams = $this->getMock( $this->serverParams = $this->getMock(

View File

@ -54,10 +54,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');

View File

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

View File

@ -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';

View File

@ -23,10 +23,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);

View File

@ -53,10 +53,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');

View File

@ -39,14 +39,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');

View File

@ -21,18 +21,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));

View File

@ -22,13 +22,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());
@ -50,14 +43,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', '/');

View File

@ -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 testGetController() public function testGetController()
{ {
$logger = new Logger(); $logger = new Logger();

View File

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

View File

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

View File

@ -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
*/ */

View File

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

View File

@ -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
*/ */

View File

@ -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;

View File

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

View File

@ -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
*/ */

View File

@ -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('Symfony\\Component\\DependencyInjection\\ContainerBuilder'); $container = $this->getMock('Symfony\\Component\\DependencyInjection\\ContainerBuilder');

View File

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

View File

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

View File

@ -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');

View File

@ -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');

View File

@ -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'));

View File

@ -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
*/ */

View File

@ -18,13 +18,6 @@ use Symfony\Component\HttpFoundation\Request;
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));

View File

@ -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
*/ */

View File

@ -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'))));

View File

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

View File

@ -19,19 +19,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();

View File

@ -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;

View File

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

View File

@ -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
*/ */

View File

@ -22,13 +22,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';

View File

@ -19,13 +19,6 @@ use Symfony\Component\HttpFoundation\Response;
class ProfilerTest extends \PHPUnit_Framework_TestCase class ProfilerTest 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()
{ {
if (!class_exists('SQLite3') && (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers()))) { if (!class_exists('SQLite3') && (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers()))) {

View File

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

View File

@ -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')

View File

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

Some files were not shown because too many files have changed in this diff Show More