You are here

public function ContentAccessTestHelperTrait::changeAccessContentType in Content Access 8

Change access permissions for a content type.

6 calls to ContentAccessTestHelperTrait::changeAccessContentType()
ContentAccessAclTest::testViewAccess in tests/src/Functional/ContentAccessAclTest.php
Test Viewing accessibility with permissions for single users.
ContentAccessModuleTest::testOwnViewAccess in tests/src/Functional/ContentAccessModuleTest.php
Test own view access.
ContentAccessModuleTest::testViewAccess in tests/src/Functional/ContentAccessModuleTest.php
Test for viewing nodes.
ContentAccessTestHelperTrait::changeAccessContentTypeKeyword in tests/src/Functional/ContentAccessTestHelperTrait.php
Access keyword for content type.
ContentAccessTestHelperTrait::changeAccessPerNode in tests/src/Functional/ContentAccessTestHelperTrait.php
Change the per node access setting for a content type.

... See full list

File

tests/src/Functional/ContentAccessTestHelperTrait.php, line 24

Class

ContentAccessTestHelperTrait
Helper class with auxiliary functions for content access module tests.

Namespace

Drupal\Tests\content_access\Functional

Code

public function changeAccessContentType($accessSettings) {
  $this
    ->drupalPostForm('admin/structure/types/manage/' . $this->contentType
    ->id() . '/access', $accessSettings, t('Submit'));

  // Both these may be printed:
  // 'Permissions have been changed' || 'No change' => 'change'.
  $this
    ->assertSession()
    ->pageTextContains(t('change'));
}