public function FieldUnitTest::testRender

Tests that the render function is called.

File

drupal/core/modules/views/lib/Drupal/views/Tests/Handler/FieldUnitTest.php, line 56
Contains \Drupal\views\Tests\Handler\FieldUnitTest.

Class

FieldUnitTest
Tests the generic field handler.

Namespace

Drupal\views\Tests\Handler

Code

public function testRender() {
  $view = views_get_view('test_field_tokens');
  $this
    ->executeView($view);
  $random_text = $this
    ->randomName();
  $view->field['job']
    ->setTestValue($random_text);
  $this
    ->assertEqual($view->field['job']
    ->theme($view->result[0]), $random_text, 'Make sure the render method rendered the manual set value.');
}