You are here

protected function AgreementTestCase::submitAgreementFormWithAgreeing in Agreement 7.2

Same name and namespace in other branches
  1. 6.2 agreement.test \AgreementTestCase::submitAgreementFormWithAgreeing()
  2. 6 agreement.test \AgreementTestCase::submitAgreementFormWithAgreeing()

Submits the agreement correctly.

Parameters

int $uid: The user ID of the user that is agreeing.

7 calls to AgreementTestCase::submitAgreementFormWithAgreeing()
AgreementCustomUnprivilegedUserTestCase::testAgreementDestination in ./agreement.test
Tests the agreement destination functionality.
AgreementCustomUnprivilegedUserTestCase::testAgreementFrequency in ./agreement.test
Tests the agreement frequency setting.
AgreementDefaultsPrivilegedUserTestCase::testAgreement in ./agreement.test
Tests the agreement page functionality.
AgreementDefaultsUnprivilegedUserTestCase::testAgreement in ./agreement.test
Tests the agreement page for every page except the front page.
AgreementMultipleRoleTestCase::testAgreementForFirstRole in ./agreement.test
Asserts that the user with the first role gets the agreement page.

... See full list

File

./agreement.test, line 167
Tests for Agreement module.

Class

AgreementTestCase
Agreement base test class.

Code

protected function submitAgreementFormWithAgreeing($uid) {

  // Submit with checking the I agree box.
  $field_values['agree'] = '1';
  $this
    ->drupalPost('agreement', $field_values, $this->agreement['settings']['submit']);
  $this
    ->assertText($this->agreement['settings']['success'], t('Correct success message'));
  $this
    ->isNotAgreementPage($this->agreement);
}