You are here

public function BasicBlogTest::testBlogPageNoEntries in Blog 3.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/BasicBlogTest.php \Drupal\Tests\blog\Functional\BasicBlogTest::testBlogPageNoEntries()

View the blog of a user with no blog entries as another user.

File

tests/src/Functional/BasicBlogTest.php, line 55

Class

BasicBlogTest
Test blog functionality.

Namespace

Drupal\Tests\blog\Functional

Code

public function testBlogPageNoEntries() {
  $this
    ->drupalLogin($this->regularUser);
  $this
    ->drupalGet('blog/' . $this->bloggerNoEntries
    ->id());
  $this
    ->assertResponse(200);
  $this
    ->assertTitle($this->bloggerNoEntries
    ->getDisplayName() . "'s blog | Drupal");
  $this
    ->assertText($this->bloggerNoEntries
    ->getDisplayName() . ' has not created any blog entries.');
}