DefaultMetatagsTest.php in Zircon Profile 8.0
File
core/modules/system/src/Tests/Page/DefaultMetatagsTest.php
View source
<?php
namespace Drupal\system\Tests\Page;
use Drupal\simpletest\WebTestBase;
class DefaultMetatagsTest extends WebTestBase {
public function testMetaTag() {
$this
->drupalGet('');
$result = $this
->xpath('//meta[@charset="utf-8"]');
$this
->assertEqual(count($result), 1);
$result = $this
->xpath('//meta');
$this
->assertEqual((string) $result[0]
->attributes()->charset, 'utf-8');
$result = $this
->xpath('//link[@rel = "shortcut icon"]');
$this
->assertEqual(count($result), 1, 'The shortcut icon is present.');
}
}