function BlogTestCase::testBlogPageNoEntries in Drupal 7
View the blog of a user with no blog entries as another user.
File
- modules/
blog/ blog.test, line 52 - Tests for blog.module.
Class
- BlogTestCase
- @file Tests for blog.module.
Code
function testBlogPageNoEntries() {
$this
->drupalLogin($this->big_user);
$this
->drupalGet('blog/' . $this->own_user->uid);
$this
->assertResponse(200);
$this
->assertTitle(t("@name's blog", array(
'@name' => format_username($this->own_user),
)) . ' | Drupal', 'Blog title was displayed');
$this
->assertText(t('@author has not created any blog entries.', array(
'@author' => format_username($this->own_user),
)), 'Users blog displayed with no entries');
}