public function PluginTestBase::testStateContextExceptionSetProperty in Purge 8.3
Test that you can't set a property without specifying the state context.
See also
\Drupal\purge\Plugin\Purge\Invalidation\InvalidationInterface::setProperty
File
- tests/
src/ Kernel/ Invalidation/ PluginTestBase.php, line 232
Class
- PluginTestBase
- Provides an abstract test class to thoroughly test invalidation types.
Namespace
Drupal\Tests\purge\Kernel\InvalidationCode
public function testStateContextExceptionSetProperty() : void {
$i = $this
->getInstance();
$this
->expectException(\LogicException::class);
$this
->expectExceptionMessage('Call ::setStateContext() before setting properties!');
$i
->setProperty('my_setting', FALSE);
}