You are here

public function OptimizelyTestUserRoleTestCase::testOptimizelyTestUserRoleAdminAccess in Optimizely 7.2

Same name and namespace in other branches
  1. 7.3 optimizely.test \OptimizelyTestUserRoleTestCase::testOptimizelyTestUserRoleAdminAccess()

OptimizelyTestAdminRoleCase testOptimizelyTestUserRoleAdminAccess()

File

./optimizely.test, line 104
Optimizely Tests

Class

OptimizelyTestUserRoleTestCase
OptimizelyTestUserRoleTestCase: Create anonymous, authenticated and privileged user to test access to module related pages.

Code

public function testOptimizelyTestUserRoleAdminAccess() {
  $this
    ->drupalLogin($this->privileged_user);
  $this
    ->drupalGet('admin/config/system/optimizely');
  $this
    ->assertNoRaw('Access denied', '** <strong>Admin user can access</strong> project listing page -> admin/config/system/optimizely');
  $this
    ->drupalGet('admin/config/system/optimizely/default');
  $this
    ->assertNoRaw('Access denied', '** <strong>Admin user can access</strong> project listing page -> admin/config/system/optimizely/default');
  $this
    ->drupalGet('admin/config/system/optimizely/add_update');
  $this
    ->assertNoRaw('Access denied', '** <strong>Admin user can access</strong> add project form page -> admin/config/system/optimizely/add_update');
  $this
    ->drupalGet('admin/config/system/optimizely/settings');
  $this
    ->assertNoRaw('Access denied', '** <strong>Admin user can access</strong> settings page -> admin/config/system/optimizely/settings');
  $this
    ->drupalGet('admin/config/system/optimizely/ajax');
  $this
    ->assertNoRaw('Access denied', 'Admin user can access AJAX callback URL -> admin/config/system/optimizely/ajax');

  // admin/config/system/optimizely/add_update/%
  // admin/config/system/optimizely/delete/%
  $this
    ->drupalLogout();
}