public function BasicBlogTest::testBlogPageNoEntries in Blog 8.2
Same name and namespace in other branches
- 3.x 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\FunctionalCode
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.');
}