protected function ParagraphsLibraryItemTest::assertLibraryItemAccess

Asserts HTTP response codes for library item operations.

1 call to ParagraphsLibraryItemTest::assertLibraryItemAccess()
ParagraphsLibraryItemTest::testLibraryItemsAccessControl in paragraphs/modules/paragraphs_library/tests/src/Functional/ParagraphsLibraryItemTest.php
Tests the library items permissions in different scenarios.

File

paragraphs/modules/paragraphs_library/tests/src/Functional/ParagraphsLibraryItemTest.php, line 125

Class

ParagraphsLibraryItemTest
Tests the functionality of the Paragraphs Library.

Namespace

Drupal\Tests\paragraphs_library\Functional

Code

protected function assertLibraryItemAccess($library_item_id, $response_code, $operation) {
  $this
    ->drupalGet("admin/content/paragraphs/{$library_item_id}/{$operation}");
  $this
    ->assertSession()
    ->statusCodeEquals($response_code);
}