public function MetatagContextTest::testExportedPage in Metatag 7
Test the Context integration.
File
- metatag_context/
tests/ MetatagContextTest.test, line 96 - Functional tests for the Metatag:Context module.
Class
- MetatagContextTest
- Functional tests for the Metatag:Context module.
Code
public function testExportedPage() {
$this
->drupalGet('metatag-context-test');
$this
->assertResponse(200);
// Test the page title.
$this
->assertTitle('Metatag:Context test page title tag');
// Test the description meta tag.
$xpath = $this
->xpath("//meta[@name='description']");
$this
->assertEqual(count($xpath), 1, 'Exactly one description meta tag found.');
$this
->assertEqual($xpath[0]['content'], 'Metatag:Context test description tag.');
// Test the keywords meta tag.
$xpath = $this
->xpath("//meta[@name='keywords']");
$this
->assertEqual(count($xpath), 1, 'Exactly one keywords meta tag found.');
$this
->assertEqual($xpath[0]['content'], 'Test, page, keywords');
}