public function LinkTest::testGetMethod in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/dom-crawler/Tests/LinkTest.php \Symfony\Component\DomCrawler\Tests\LinkTest::testGetMethod()
File
- vendor/
symfony/ dom-crawler/ Tests/ LinkTest.php, line 51
Class
Namespace
Symfony\Component\DomCrawler\TestsCode
public function testGetMethod() {
$dom = new \DOMDocument();
$dom
->loadHTML('<html><a href="/foo">foo</a></html>');
$node = $dom
->getElementsByTagName('a')
->item(0);
$link = new Link($node, 'http://example.com/');
$this
->assertEquals('GET', $link
->getMethod(), '->getMethod() returns the method of the link');
$link = new Link($node, 'http://example.com/', 'post');
$this
->assertEquals('POST', $link
->getMethod(), '->getMethod() returns the method of the link');
}