public function PluginTestBase::testStateSetInvalidStateB 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 315
Class
- PluginTestBase
- Provides an abstract test class to thoroughly test invalidation types.
Namespace
Drupal\Tests\purge\Kernel\InvalidationCode
public function testStateSetInvalidStateB() : void {
$i = $this
->getInstance();
$this
->expectException(InvalidStateException::class);
$this
->expectExceptionMessage('$state not an integer!');
$i
->setState('FRESH');
}