private function BlogTestCase::doBasicTests
7.x blog.test | private BlogTestCase::doBasicTests($user, $admin) |
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 drupal-7.x/
modules/ blog/ blog.test - Login users, create blog nodes, and test blog functionality through the admin and user interfaces.
File
- drupal-7.x/
modules/ blog/ blog.test, line 103 - Tests for blog.module.
Class
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);
}