You are here

public function CrawlerTest::testLast in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/dom-crawler/Tests/CrawlerTest.php \Symfony\Component\DomCrawler\Tests\CrawlerTest::testLast()

File

vendor/symfony/dom-crawler/Tests/CrawlerTest.php, line 827

Class

CrawlerTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testLast() {
  $crawler = $this
    ->createTestCrawler()
    ->filterXPath('//ul[1]/li');
  $this
    ->assertNotSame($crawler, $crawler
    ->last(), '->last() returns a new instance of a crawler');
  $this
    ->assertInstanceOf('Symfony\\Component\\DomCrawler\\Crawler', $crawler, '->last() returns a new instance of a crawler');
  $this
    ->assertEquals('Three', $crawler
    ->last()
    ->text());
}