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