|
13 | 13 |
|
14 | 14 | use PHPUnit\Framework\TestCase;
|
15 | 15 | use Symfony\Component\DomCrawler\Crawler;
|
| 16 | +use Symfony\Component\DomCrawler\Form; |
| 17 | +use Symfony\Component\DomCrawler\Image; |
| 18 | +use Symfony\Component\DomCrawler\Link; |
16 | 19 |
|
17 | 20 | abstract class AbstractCrawlerTest extends TestCase
|
18 | 21 | {
|
@@ -719,7 +722,7 @@ public function testSelectButtonWithDoubleQuotesInNameAttribute()
|
719 | 722 | public function testLink()
|
720 | 723 | {
|
721 | 724 | $crawler = $this->createTestCrawler('http://example.com/bar/')->selectLink('Foo');
|
722 |
| - $this->assertInstanceOf(\Symfony\Component\DomCrawler\Link::class, $crawler->link(), '->link() returns a Link instance'); |
| 725 | + $this->assertInstanceOf(Link::class, $crawler->link(), '->link() returns a Link instance'); |
723 | 726 |
|
724 | 727 | $this->assertEquals('POST', $crawler->link('post')->getMethod(), '->link() takes a method as its argument');
|
725 | 728 |
|
@@ -753,7 +756,7 @@ public function testInvalidLinks()
|
753 | 756 | public function testImage()
|
754 | 757 | {
|
755 | 758 | $crawler = $this->createTestCrawler('http://example.com/bar/')->selectImage('Bar');
|
756 |
| - $this->assertInstanceOf(\Symfony\Component\DomCrawler\Image::class, $crawler->image(), '->image() returns an Image instance'); |
| 759 | + $this->assertInstanceOf(Image::class, $crawler->image(), '->image() returns an Image instance'); |
757 | 760 |
|
758 | 761 | try {
|
759 | 762 | $this->createTestCrawler()->filterXPath('//ol')->image();
|
@@ -829,8 +832,8 @@ public function testForm()
|
829 | 832 | $testCrawler = $this->createTestCrawler('http://example.com/bar/');
|
830 | 833 | $crawler = $testCrawler->selectButton('FooValue');
|
831 | 834 | $crawler2 = $testCrawler->selectButton('FooBarValue');
|
832 |
| - $this->assertInstanceOf(\Symfony\Component\DomCrawler\Form::class, $crawler->form(), '->form() returns a Form instance'); |
833 |
| - $this->assertInstanceOf(\Symfony\Component\DomCrawler\Form::class, $crawler2->form(), '->form() returns a Form instance'); |
| 835 | + $this->assertInstanceOf(Form::class, $crawler->form(), '->form() returns a Form instance'); |
| 836 | + $this->assertInstanceOf(Form::class, $crawler2->form(), '->form() returns a Form instance'); |
834 | 837 |
|
835 | 838 | $this->assertEquals($crawler->form()->getFormNode()->getAttribute('id'), $crawler2->form()->getFormNode()->getAttribute('id'), '->form() works on elements with form attribute');
|
836 | 839 |
|
|
0 commit comments