You are here

protected function PermissionEventTest::assertPermission in Organic groups 8

Asserts that the two permissions are identical.

Parameters

\Drupal\og\PermissionInterface $expected: The expected permission.

\Drupal\og\PermissionInterface $actual: The actual permission.

1 call to PermissionEventTest::assertPermission()
PermissionEventTest::testPermissionEventIntegration in tests/src/Kernel/PermissionEventTest.php
Tests that the two OG modules can provide their own OG permissions.

File

tests/src/Kernel/PermissionEventTest.php, line 226

Class

PermissionEventTest
Tests the implementations of the PermissionEvent in 'og' and 'og_ui'.

Namespace

Drupal\Tests\og\Kernel

Code

protected function assertPermission(PermissionInterface $expected, PermissionInterface $actual) {
  foreach ($this
    ->getPermissionProperties($expected) as $property) {
    $this
      ->assertEquals($expected
      ->get($property), $actual
      ->get($property), "The {$property} property is equal.");
  }
}