You are here

public function PluginTestBase::testStateSetInvalidStateE in Purge 8.3

Test exceptions when setting invalid states.

See also

\Drupal\purge\Plugin\Purge\Invalidation\InvalidationInterface::setState

File

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

Class

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

Namespace

Drupal\Tests\purge\Kernel\Invalidation

Code

public function testStateSetInvalidStateE() : void {
  $i = $this
    ->getInstance();
  $this
    ->expectException(InvalidStateException::class);
  $this
    ->expectExceptionMessage('$state is out of range!');
  $i
    ->setState(100);
}