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