@@ -425,8 +425,6 @@ public function testFilterXPathWithManuallyRegisteredNamespace()
425
425
*/
426
426
public function testFilter ()
427
427
{
428
- $ this ->markSkippedIfCssSelectorNotPresent ();
429
-
430
428
$ crawler = $ this ->createTestCrawler ();
431
429
$ this ->assertNotSame ($ crawler , $ crawler ->filter ('li ' ), '->filter() returns a new instance of a crawler ' );
432
430
$ this ->assertInstanceOf ('Symfony \\Component \\DomCrawler \\Crawler ' , $ crawler , '->filter() returns a new instance of a crawler ' );
@@ -438,17 +436,13 @@ public function testFilter()
438
436
439
437
public function testFilterWithDefaultNamespace ()
440
438
{
441
- $ this ->markSkippedIfCssSelectorNotPresent ();
442
-
443
439
$ crawler = $ this ->createTestXmlCrawler ()->filter ('default|entry default|id ' );
444
440
$ this ->assertCount (1 , $ crawler , '->filter() automatically registers namespaces ' );
445
441
$ this ->assertSame ('tag:youtube.com,2008:video:kgZRZmEc9j4 ' , $ crawler ->text ());
446
442
}
447
443
448
444
public function testFilterWithNamespace ()
449
445
{
450
- $ this ->markSkippedIfCssSelectorNotPresent ();
451
-
452
446
CssSelector::disableHtmlExtension ();
453
447
454
448
$ crawler = $ this ->createTestXmlCrawler ()->filter ('yt|accessControl ' );
@@ -457,8 +451,6 @@ public function testFilterWithNamespace()
457
451
458
452
public function testFilterWithMultipleNamespaces ()
459
453
{
460
- $ this ->markSkippedIfCssSelectorNotPresent ();
461
-
462
454
CssSelector::disableHtmlExtension ();
463
455
464
456
$ crawler = $ this ->createTestXmlCrawler ()->filter ('media|group yt|aspectRatio ' );
@@ -770,11 +762,4 @@ protected function createNodeList()
770
762
771
763
return $ domxpath ->query ('//div ' );
772
764
}
773
-
774
- protected function markSkippedIfCssSelectorNotPresent ()
775
- {
776
- if (!class_exists ('Symfony\Component\CssSelector\CssSelector ' )) {
777
- $ this ->markTestSkipped ('The "CssSelector" component is not available ' );
778
- }
779
- }
780
765
}
0 commit comments