You are here

function XMLSitemapI18nNodeTest::testNodeLanguageData in XML sitemap 6.2

Same name and namespace in other branches
  1. 7.2 xmlsitemap_i18n/xmlsitemap_i18n.test \XMLSitemapI18nNodeTest::testNodeLanguageData()

File

xmlsitemap_i18n/xmlsitemap_i18n.test, line 131
Unit tests for the xmlsitemap_i18n module.

Class

XMLSitemapI18nNodeTest

Code

function testNodeLanguageData() {
  $node = $this
    ->drupalCreateNode(array());
  $this
    ->drupalPost('node/' . $node->nid . '/edit', array(
    'language' => 'en',
  ), t('Save'));
  $link = $this
    ->assertSitemapLink('node', $node->nid);
  $this
    ->assertIdentical($link['language'], 'en');
  $this
    ->drupalPost('node/' . $node->nid . '/edit', array(
    'language' => 'fr',
  ), t('Save'));
  $link = $this
    ->assertSitemapLink('node', $node->nid);
  $this
    ->assertIdentical($link['language'], 'fr');
}