You are here

public function CrawlerTest::testAddHtmlContentCharset in Zircon Profile 8

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

@covers Symfony\Component\DomCrawler\Crawler::addHtmlContent @requires extension mbstring

File

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

Class

CrawlerTest

Namespace

Symfony\Component\DomCrawler\Tests

Code

public function testAddHtmlContentCharset() {
  $crawler = new Crawler();
  $crawler
    ->addHtmlContent('<html><div class="foo">Tiếng Việt</html>', 'UTF-8');
  $this
    ->assertEquals('Tiếng Việt', $crawler
    ->filterXPath('//div')
    ->text());
}