You are here

function autocompleteWidgetsNodeReferenceTest::testNodeTitles in Autocomplete Widgets for Text and Number Fields 7

File

tests/autocomplete_widgets.test, line 269

Class

autocompleteWidgetsNodeReferenceTest

Code

function testNodeTitles() {
  $instance = $this
    ->createInstance($this->field, 'autocomplete_widgets_node_reference', $this->settings);

  // Create a bunch of article nodes.
  foreach ($this->test_values as $value) {
    $settings = array(
      'type' => 'article',
      'title' => $value,
    );
    $node = $this
      ->drupalCreateNode($settings);
  }
  $this
    ->basicTest($instance);
  $this
    ->startsWithTest($instance);
  $this
    ->caseTest($instance);
  $this
    ->xssTest($instance);
}