You are here

protected function AgreementAnonymousTest::setUp in Agreement 8.2

Same name and namespace in other branches
  1. 3.0.x tests/src/Functional/AgreementAnonymousTest.php \Drupal\Tests\agreement\Functional\AgreementAnonymousTest::setUp()

Overrides AgreementTestBase::setUp

File

tests/src/Functional/AgreementAnonymousTest.php, line 15

Class

AgreementAnonymousTest
Tests agreement configured for anonymous user.

Namespace

Drupal\Tests\agreement\Functional

Code

protected function setUp() {
  parent::setUp();
  $settings = $this->agreement
    ->getSettings();
  $settings['roles'][] = 'anonymous';
  $this->agreement
    ->set('settings', $settings);
  $this->agreement
    ->save();
}