You are here

public function EntityViewModeTestHelper::assertViewModeExists in Entity view modes 7

1 call to EntityViewModeTestHelper::assertViewModeExists()
EntityViewModeFunctionalTest::testEntityViewModes in ./entity_view_mode.test

File

./entity_view_mode.test, line 39
Test integration for the entity_view_mode module.

Class

EntityViewModeTestHelper
@file Test integration for the entity_view_mode module.

Code

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