12
12
namespace Symfony \Component \DomCrawler \Tests ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
+ use Symfony \Bridge \PhpUnit \ForwardCompatTestTrait ;
15
16
use Symfony \Component \DomCrawler \Crawler ;
16
17
17
18
class CrawlerTest extends TestCase
18
19
{
20
+ use ForwardCompatTestTrait;
21
+
19
22
public function testConstructor ()
20
23
{
21
24
$ crawler = new Crawler ();
@@ -843,7 +846,7 @@ public function testChaining()
843
846
public function testLinks ()
844
847
{
845
848
$ crawler = $ this ->createTestCrawler ('http://example.com/bar/ ' )->selectLink ('Foo ' );
846
- $ this ->assertInternalType ( ' array ' , $ crawler ->links (), '->links() returns an array ' );
849
+ $ this ->assertIsArray ( $ crawler ->links (), '->links() returns an array ' );
847
850
848
851
$ this ->assertCount (4 , $ crawler ->links (), '->links() returns an array ' );
849
852
$ links = $ crawler ->links ();
@@ -855,7 +858,7 @@ public function testLinks()
855
858
public function testImages ()
856
859
{
857
860
$ crawler = $ this ->createTestCrawler ('http://example.com/bar/ ' )->selectImage ('Bar ' );
858
- $ this ->assertInternalType ( ' array ' , $ crawler ->images (), '->images() returns an array ' );
861
+ $ this ->assertIsArray ( $ crawler ->images (), '->images() returns an array ' );
859
862
860
863
$ this ->assertCount (4 , $ crawler ->images (), '->images() returns an array ' );
861
864
$ images = $ crawler ->images ();
0 commit comments