public function SlickCrudTest::testAdminAccess in Slick Carousel 7.3
Tests Slick permission.
File
- tests/
SlickCrudTest.test, line 68
Class
- SlickCrudTest
- Tests the Slick optionsets, configuration options and permission controls.
Code
public function testAdminAccess() {
// Login as the admin user.
$this
->drupalLogin($this->adminUser);
// Load admin page.
$this
->drupalGet('admin/config/media/slick');
$this
->assertResponse(200, 'Administrative permission allows access to administration page.');
// Logout as admin user.
$this
->drupalLogout();
// Login as any user.
$this
->drupalLogin($this->anyUser);
// Attempt to load Slick admin page.
$this
->drupalGet('admin/config/media/slick');
$this
->assertResponse(403, 'Regular users do not have access to administer Slick pages.');
}