private function BlogTestCase::doBasicTests in Drupal 7
Run basic tests on the indicated user.
Parameters
object $user: The logged in user.
boolean $admin: User has 'access administration pages' privilege.
1 call to BlogTestCase::doBasicTests()
- BlogTestCase::testBlog in modules/
blog/ blog.test - Login users, create blog nodes, and test blog functionality through the admin and user interfaces.
File
- modules/
blog/ blog.test, line 103 - Tests for blog.module.
Class
- BlogTestCase
- @file Tests for blog.module.
Code
private function doBasicTests($user, $admin) {
// Login the user.
$this
->drupalLogin($user);
// Create blog node.
$node = $this
->drupalCreateNode(array(
'type' => 'blog',
));
// Verify the user has access to all the blog nodes.
$this
->verifyBlogs($user, $node, $admin);
// Create one more node to test the blog page with more than one node
$this
->drupalCreateNode(array(
'type' => 'blog',
'uid' => $user->uid,
));
// Verify the blog links are displayed.
$this
->verifyBlogLinks($user);
}