1 field_ui.test public FieldUIViewModeTestHelper::assertViewModeExists($entity_type, $view_mode)

File

core/modules/field_ui/tests/field_ui.test, line 908
Tests for field_ui.module.

Class

FieldUIViewModeTestHelper
Helper class for testing display mode functionality.

Code

public function assertViewModeExists($entity_type, $view_mode) {
  $info = entity_get_info($entity_type);
  return $this->assertTrue(!empty($info['view modes'][$view_mode]), "Display mode $view_mode found for entity type $entity_type.");
}