You are here

public function AgreementMultilingualTest::assertNotAgreed in Agreement 3.0.x

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

Asserts that the user has not agreed to the agreement.

Parameters

\Drupal\agreement\Entity\Agreement $agreement: The agreement to agree to.

Throws

\Behat\Mink\Exception\ResponseTextException

Overrides AgreementTestBase::assertNotAgreed

1 call to AgreementMultilingualTest::assertNotAgreed()
AgreementMultilingualTest::testMultilingualAgreement in tests/src/Functional/AgreementMultilingualTest.php
Asserts the text is changed to Spanish.

File

tests/src/Functional/AgreementMultilingualTest.php, line 136

Class

AgreementMultilingualTest
Tests translating agreement.

Namespace

Drupal\Tests\agreement\Functional

Code

public function assertNotAgreed(Agreement $agreement) {
  $this
    ->drupalGet($agreement
    ->get('path'));
  $this
    ->submitForm([], 'Enviar');
  $this
    ->assertSession()
    ->pageTextContains('Debes aceptar nuestro acuerdo para continuar.');
}