$this->
assertEquals(2,
$crawler->
filter('url'
)->
count());
} public function testSelectLink() { $crawler =
$this->
createTestCrawler();
$this->
assertNotSame($crawler,
$crawler->
selectLink('Foo'
), '->selectLink() returns a new instance of a crawler'
);
$this->
assertInstanceOf(Crawler::
class,
$crawler->
selectLink('Foo'
), '->selectLink() returns a new instance of a crawler'
);
$this->
assertCount(1,
$crawler->
selectLink('Fabien\'s Foo'
), '->selectLink() selects links by the node values'
);
$this->
assertCount(1,
$crawler->
selectLink('Fabien\'s Bar'
), '->selectLink() selects links by the alt attribute of a clickable image'
);
$this->
assertCount(2,
$crawler->
selectLink('Fabien"s Foo'
), '->selectLink() selects links by the node values'
);
$this->
assertCount(2,
$crawler->
selectLink('Fabien"s Bar'
), '->selectLink() selects links by the alt attribute of a clickable image'
);
$this->
assertCount(1,
$crawler->
selectLink('\' Fabien"s Foo'
), '->selectLink() selects links by the node values'
);
$this->
assertCount(1,
$crawler->
selectLink('\' Fabien"s Bar'
), '->selectLink() selects links by the alt attribute of a clickable image'
);