function FaqAccessTestClass::testFaqAccess in Frequently Asked Questions 6
Same name and namespace in other branches
- 7.2 faq.test \FaqAccessTestClass::testFaqAccess()
- 7 faq.test \FaqAccessTestClass::testFaqAccess()
File
- ./
faq.test, line 146 - Test FAQ functionality Base test class. All tests inherits this one. Hugely based on code from the test file block.test by boombatower
Class
Code
function testFaqAccess() {
// Verify that anonymous user has no access to the faq page
$this
->faqVerifyNoAccess('faq');
// Create and login user
$normal_user = $this
->drupalCreateUser();
$this
->drupalLogin($normal_user);
// Verify that logged in user has no access to the faq page
$this
->faqVerifyNoAccess('faq');
$this
->drupalLogout();
$this
->drupalLogin($this->view_faq_user);
// Verify that the faq page is visible and available but empty
$this
->drupalGet('faq');
$this
->assertText(t('Frequently Asked Questions'), t('FAQ page is available for view faq page permissions.'));
}