|
@@ -299,6 +299,9 @@ class CrawlerTest extends \PHPUnit_Framework_TestCase
|
|
$crawler = $this->createTestCrawler('http://example.com/bar')->selectLink('Foo');
|
|
$crawler = $this->createTestCrawler('http://example.com/bar')->selectLink('Foo');
|
|
$this->assertEquals('http://example.com/foo', $crawler->link()->getUri(), '->link() returns a Link instance');
|
|
$this->assertEquals('http://example.com/foo', $crawler->link()->getUri(), '->link() returns a Link instance');
|
|
|
|
|
|
|
|
+ $crawler = $this->createTestCrawler('http://example.com/bar')->selectLink('GetLink');
|
|
|
|
+ $this->assertEquals('http://example.com/bar?get=param', $crawler->link()->getUri(), '->link() returns a Link instance');
|
|
|
|
+
|
|
try {
|
|
try {
|
|
$this->createTestCrawler()->filter('ol')->link();
|
|
$this->createTestCrawler()->filter('ol')->link();
|
|
$this->fail('->link() throws an \InvalidArgumentException if the node list is empty');
|
|
$this->fail('->link() throws an \InvalidArgumentException if the node list is empty');
|
|
@@ -475,6 +478,8 @@ class CrawlerTest extends \PHPUnit_Framework_TestCase
|
|
<a href="/bar"><img alt="Fabien"s Bar"/></a>
|
|
<a href="/bar"><img alt="Fabien"s Bar"/></a>
|
|
<a href="/bar"><img alt="\' Fabien"s Bar"/></a>
|
|
<a href="/bar"><img alt="\' Fabien"s Bar"/></a>
|
|
|
|
|
|
|
|
+ <a href="?get=param">GetLink</a>
|
|
|
|
+
|
|
<form action="foo">
|
|
<form action="foo">
|
|
<input type="submit" value="FooValue" name="FooName" id="FooId" />
|
|
<input type="submit" value="FooValue" name="FooName" id="FooId" />
|
|
<input type="button" value="BarValue" name="BarName" id="BarId" />
|
|
<input type="button" value="BarValue" name="BarName" id="BarId" />
|