You are here

public function FppPermissionsTest::testListPermission in Fieldable Panels Panes (FPP) 7

Confirm that the 'list' permission works correctly.

File

tests/fpp.permissions.test, line 87
Tests for the Fieldable Panels Panes module to ensure the permissions work.

Class

FppPermissionsTest
Tests for the Fieldable Panels Panes module to ensure the permissions work.

Code

public function testListPermission() {

  // Create a user with the admin permission.
  $permissions = array(
    'access fieldable panels panes master list',
  );
  $this->user = $this
    ->createUser($permissions);
  $this
    ->drupalLogin($this->user);

  // Load the 'list' page.
  $this
    ->drupalGet('admin/structure/fieldable-panels-panes/' . $this->bundle . '/list');
  $this
    ->assertResponse(200, 'Loaded the List page for the default FPP type.');
  $this
    ->assertText(t('There are currently no entities of this type'));
}