function AnnounceFeedTestValidatePermissions::testAnnounceWithPermission
Testing the announcements page with access announcements permission.
File
-
modules/
announcements_feed/ tests/ announce_feed_test.test, line 238
Class
- AnnounceFeedTestValidatePermissions
- Test the Announcements module permissions.
Code
public function testAnnounceWithPermission() {
// Create a user with proper permission.
$account = $this->drupalCreateUser(array(
'access toolbar',
'access announcements',
));
$this->drupalLogin($account);
$this->drupalGet('');
$this->drupalGet('admin/announcements_feed');
$this->assertText('Announcements');
$this->drupalLogout();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.