function FlexsliderTestCase::testAdminAccess in Flex Slider 7
Same name and namespace in other branches
- 7.2 flexslider.test \FlexsliderTestCase::testAdminAccess()
File
- ./
flexslider.test, line 31 - Test cases for Flex Slider
Class
- FlexsliderTestCase
- @file Test cases for Flex Slider
Code
function testAdminAccess() {
// Login as the admin user
$this
->drupalLogin($this->admin_user);
// Load admin page
$this
->drupalGet('admin/config/media/flexslider');
$this
->assertResponse(200, t('Administrative permission allows access to administration page.'));
// Logout as admin user
$this
->drupalLogout();
// Login as any user
$this
->drupalLogin($this->any_user);
// Attempt to load admin page
$this
->drupalGet('admin/config/media/flexslider');
$this
->assertResponse(403, t('Regular users do not have access to administrative pages.'));
}