You are here

public function EntityViewModeTestHelper::getActualViewMode in Entity view modes 7

1 call to EntityViewModeTestHelper::getActualViewMode()
EntityViewModeTestHelper::assertActualViewMode in ./entity_view_mode.test

File

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

Class

EntityViewModeTestHelper
@file Test integration for the entity_view_mode module.

Code

public function getActualViewMode($entity_type, $bundle, $view_mode) {
  $view_mode_settings = field_view_mode_settings($entity_type, $bundle);
  return !empty($view_mode_settings[$view_mode]['custom_settings']) ? $view_mode : 'default';
}