Chris@0: entity->save(); Chris@0: Chris@0: // Create a web user. Chris@0: $web_user = $this->drupalCreateUser(['view test entity', 'administer entity_test content']); Chris@0: $this->drupalLogin($web_user); Chris@0: Chris@0: // Display form. Chris@0: $this->drupalGet('entity_test_rev/manage/' . $this->entity->id() . '/edit'); Chris@0: $options = $this->xpath('//select[@id="edit-test-options"]/option'); Chris@0: $this->assertEqual(count($options), count($this->test) + 1); Chris@0: foreach ($options as $option) { Chris@17: $value = $option->getValue(); Chris@0: if ($value != '_none') { Chris@0: $this->assertTrue(array_search($value, $this->test)); Chris@0: } Chris@0: } Chris@0: } Chris@0: Chris@0: }