You are here

public function RealisticDummyContentDatabaseTestCase::testAttributes in Realistic Dummy Content 7.2

Same name and namespace in other branches
  1. 8.2 api/drupal7-simpletests/RealisticDummyContentDatabaseTestCase.test \RealisticDummyContentDatabaseTestCase::testAttributes()

File

api/drupal7-simpletests/RealisticDummyContentDatabaseTestCase.test, line 43
Drupal 7 tests.

Class

RealisticDummyContentDatabaseTestCase
The test case

Code

public function testAttributes() {
  $node = $this
    ->drupalCreateNode(array(
    'type' => 'article',
  ));
  $modifier = new RealisticDummyContentFieldModifier($node, 'node');
  $attributes = $modifier
    ->GetAttributes();
  $existing = array();
  foreach ($attributes as $index => $attribute) {
    $name = $attribute
      ->GetName();
    $this
      ->assertFalse(in_array($name, $existing), 'Attribute ' . $name . ' only has one modifier');
    $existing[] = $name;
  }
}