You are here

public function PluginTestBase::testImmutable in Purge 8.3

Tests \Drupal\purge\Plugin\Purge\Invalidation\ImmutableInvalidation.

File

tests/src/Kernel/Invalidation/PluginTestBase.php, line 103

Class

PluginTestBase
Provides an abstract test class to thoroughly test invalidation types.

Namespace

Drupal\Tests\purge\Kernel\Invalidation

Code

public function testImmutable() : void {
  $immutable = $this
    ->getImmutableInstance();
  $mutable = $this
    ->getInstance();
  $this
    ->assertEquals($immutable
    ->__toString(), $mutable
    ->__toString());
  $this
    ->assertEquals($immutable
    ->getExpression(), $mutable
    ->getExpression());
  $this
    ->assertEquals($immutable
    ->getState(), $mutable
    ->getState());
  $this
    ->assertEquals($immutable
    ->getStateString(), $mutable
    ->getStateString());
  $this
    ->assertEquals($immutable
    ->getType(), $mutable
    ->getType());
}