|
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 | { |
@@ -710,7 +713,7 @@ public function testSelectButtonWithDoubleQuotesInNameAttribute() |
710 | 713 | public function testLink() |
711 | 714 | { |
712 | 715 | $crawler = $this->createTestCrawler('http://example.com/bar/')->selectLink('Foo'); |
713 | | - $this->assertInstanceOf(\Symfony\Component\DomCrawler\Link::class, $crawler->link(), '->link() returns a Link instance'); |
| 716 | + $this->assertInstanceOf(Link::class, $crawler->link(), '->link() returns a Link instance'); |
714 | 717 |
|
715 | 718 | $this->assertEquals('POST', $crawler->link('post')->getMethod(), '->link() takes a method as its argument'); |
716 | 719 |
|
@@ -744,7 +747,7 @@ public function testInvalidLinks() |
744 | 747 | public function testImage() |
745 | 748 | { |
746 | 749 | $crawler = $this->createTestCrawler('http://example.com/bar/')->selectImage('Bar'); |
747 | | - $this->assertInstanceOf(\Symfony\Component\DomCrawler\Image::class, $crawler->image(), '->image() returns an Image instance'); |
| 750 | + $this->assertInstanceOf(Image::class, $crawler->image(), '->image() returns an Image instance'); |
748 | 751 |
|
749 | 752 | try { |
750 | 753 | $this->createTestCrawler()->filterXPath('//ol')->image(); |
@@ -820,8 +823,8 @@ public function testForm() |
820 | 823 | $testCrawler = $this->createTestCrawler('http://example.com/bar/'); |
821 | 824 | $crawler = $testCrawler->selectButton('FooValue'); |
822 | 825 | $crawler2 = $testCrawler->selectButton('FooBarValue'); |
823 | | - $this->assertInstanceOf(\Symfony\Component\DomCrawler\Form::class, $crawler->form(), '->form() returns a Form instance'); |
824 | | - $this->assertInstanceOf(\Symfony\Component\DomCrawler\Form::class, $crawler2->form(), '->form() returns a Form instance'); |
| 826 | + $this->assertInstanceOf(Form::class, $crawler->form(), '->form() returns a Form instance'); |
| 827 | + $this->assertInstanceOf(Form::class, $crawler2->form(), '->form() returns a Form instance'); |
825 | 828 |
|
826 | 829 | $this->assertEquals($crawler->form()->getFormNode()->getAttribute('id'), $crawler2->form()->getFormNode()->getAttribute('id'), '->form() works on elements with form attribute'); |
827 | 830 |
|
|
0 commit comments