public function ContextItemTest::testSettings in Core Context 8
Tests attaching contexts to third-party settings.
File
- tests/
src/ Kernel/ ContextItemTest.php, line 40
Class
- ContextItemTest
- @group core_context
Namespace
Drupal\Tests\core_context\KernelCode
public function testSettings() {
EntityTestBundle::create([
'id' => 'foobaz',
])
->setThirdPartySetting('core_context', 'contexts', [
'wambooli' => [
'type' => 'string',
'label' => 'Pastafazoul!',
'description' => 'I would try to wow you, but I cannot be arsed.',
'value' => 'Behold!',
],
])
->save();
}