You are here

public function AgreementTestBase::assertFrontPage in Agreement 3.0.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/AgreementTestBase.php \Drupal\Tests\agreement\Functional\AgreementTestBase::assertFrontPage()

Asserts that the current page is the front page.

Parameters

string $message: The message to display for the assertion.

Throws

\Behat\Mink\Exception\ElementNotFoundException

1 call to AgreementTestBase::assertFrontPage()
AgreementCustomUnprivilegedUserTest::testAgreementDestination in tests/src/Functional/AgreementCustomUnprivilegedUserTest.php
Tests the agreement destination functionality.

File

tests/src/Functional/AgreementTestBase.php, line 174

Class

AgreementTestBase
Tests the agreement functionality.

Namespace

Drupal\Tests\agreement\Functional

Code

public function assertFrontPage($message = 'Page is the front page.') {
  $body = $this
    ->assertSession()
    ->elementExists('xpath', 'body');
  $this
    ->assertTrue($body
    ->hasClass('path-frontpage'), $message);
}