File tree 2 files changed +4
-22
lines changed
src/Symfony/Component/DomCrawler/Tests 2 files changed +4
-22
lines changed Original file line number Diff line number Diff line change @@ -27,16 +27,7 @@ public function testConstructorWithANonImgTag()
27
27
new Image ($ dom ->getElementsByTagName ('div ' )->item (0 ), 'http://www.example.com/ ' );
28
28
}
29
29
30
- public function testBaseUriIsOptional ()
31
- {
32
- $ dom = new \DOMDocument ();
33
- $ dom ->loadHTML ('<html><img alt="foo" src="https://example.com/foo" /></html> ' );
34
-
35
- $ image = new Image ($ dom ->getElementsByTagName ('img ' )->item (0 ));
36
- $ this ->assertSame ('foo ' , $ image ->getNode ()->getAttribute ('alt ' ));
37
- }
38
-
39
- public function testBaseUriIsOptionaIfImageContainsAbsoluteUrl ()
30
+ public function testBaseUriIsOptionalWhenImageUrlIsAbsolute ()
40
31
{
41
32
$ dom = new \DOMDocument ();
42
33
$ dom ->loadHTML ('<html><img alt="foo" src="https://example.com/foo" /></html> ' );
@@ -48,7 +39,7 @@ public function testBaseUriIsOptionaIfImageContainsAbsoluteUrl()
48
39
/**
49
40
* @expectedException \InvalidArgumentException
50
41
*/
51
- public function testBaseUriMustBeAnAbsoluteUrlWhenImageUrlIsRelative ()
42
+ public function testAbsoluteBaseUriIsMandatoryWhenImageUrlIsRelative ()
52
43
{
53
44
$ dom = new \DOMDocument ();
54
45
$ dom ->loadHTML ('<html><img alt="foo" src="/foo" /></html> ' );
Original file line number Diff line number Diff line change @@ -27,16 +27,7 @@ public function testConstructorWithANonATag()
27
27
new Link ($ dom ->getElementsByTagName ('div ' )->item (0 ), 'http://www.example.com/ ' );
28
28
}
29
29
30
- public function testBaseUriIsOptional ()
31
- {
32
- $ dom = new \DOMDocument ();
33
- $ dom ->loadHTML ('<html><a href="/foo">foo</a></html> ' );
34
-
35
- $ link = new Link ($ dom ->getElementsByTagName ('a ' )->item (0 ));
36
- $ this ->assertSame ('foo ' , $ link ->getNode ()->nodeValue );
37
- }
38
-
39
- public function testBaseUriIsOptionaIfLinkContainsAbsoluteUrl ()
30
+ public function testBaseUriIsOptionalWhenLinkUrlIsAbsolute ()
40
31
{
41
32
$ dom = new \DOMDocument ();
42
33
$ dom ->loadHTML ('<html><a href="https://example.com/foo">foo</a></html> ' );
@@ -48,7 +39,7 @@ public function testBaseUriIsOptionaIfLinkContainsAbsoluteUrl()
48
39
/**
49
40
* @expectedException \InvalidArgumentException
50
41
*/
51
- public function testBaseUriMustBeAnAbsoluteUrlWhenLinkUrlIsRelative ()
42
+ public function testAbsoluteBaseUriIsMandatoryWhenLinkUrlIsRelative ()
52
43
{
53
44
$ dom = new \DOMDocument ();
54
45
$ dom ->loadHTML ('<html><a href="/foo">foo</a></html> ' );
You can’t perform that action at this time.
0 commit comments