You are here

public function ViewModePageTestCase::testAccessWithPermissions in View Mode Page 7.2

Same name and namespace in other branches
  1. 8.2 view_mode_page.test \ViewModePageTestCase::testAccessWithPermissions()

Test VMP perms

File

./view_mode_page.test, line 171

Class

ViewModePageTestCase
Tests

Code

public function testAccessWithPermissions() {
  $user = $this
    ->drupalCreateUser(array(
    'administer nodes',
    'administer content types',
    'administer view mode page',
  ));
  $this
    ->drupalLogin($user);
  $this
    ->drupalGet('admin/structure/types/manage/article/display');
  $this
    ->assertResponse(200, 'User is allowed to access the manage display page');
  $this
    ->assertFieldByName('additional_settings[view_mode_page_settings][view_mode_page_url_pattern]');
}