You are here

public function MicrodataBasicTestCase::testAttributesInMarkup in Microdata 7

Tests the placement of attributes in field markup.

File

./microdata.test, line 120
Tests for microdata.module.

Class

MicrodataBasicTestCase

Code

public function testAttributesInMarkup() {
  $body = $this
    ->randomName();
  $node = $this
    ->drupalCreateNode(array(
    'type' => $this->bundleType,
    'promote' => 1,
  ));
  $edit["{$this->taxFieldName}[und]"] = 'funny, monkey';
  $this
    ->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));

  // Test that having a reference field without a defined mapping doesn't
  // cause errors.
  $this
    ->drupalGet('node');
  $this
    ->assertNoText('Undefined index: itemprop', 'Reference fields without mappings do not cause notices.');
}