public function CrawlerTest::testSelectLink in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dom-crawler/Tests/CrawlerTest.php \Symfony\Component\DomCrawler\Tests\CrawlerTest::testSelectLink()
File
- vendor/
symfony/ dom-crawler/ Tests/ CrawlerTest.php, line 658
Class
Namespace
Symfony\Component\DomCrawler\TestsCode
public function testSelectLink() {
$crawler = $this
->createTestCrawler();
$this
->assertNotSame($crawler, $crawler
->selectLink('Foo'), '->selectLink() returns a new instance of a crawler');
$this
->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->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');
$this
->assertCount(4, $crawler
->selectLink('Foo'), '->selectLink() selects links by the node values');
$this
->assertCount(4, $crawler
->selectLink('Bar'), '->selectLink() selects links by the node values');
}