public function RabbitHoleBehaviorSettingsTest::testLoadBundleSettingsWithDefault in Rabbit Hole 8
Same name and namespace in other branches
- 2.x tests/src/Functional/RabbitHoleBehaviorSettingsTest.php \Drupal\Tests\rabbit_hole\Functional\RabbitHoleBehaviorSettingsTest::testLoadBundleSettingsWithDefault()
Test loading behavior settings for a nonexistent bundle returns defaults.
File
- tests/
src/ Functional/ RabbitHoleBehaviorSettingsTest.php, line 110
Class
- RabbitHoleBehaviorSettingsTest
- Test the RabbitHoleBehaviorSettings configuration entity functionality.
Namespace
Drupal\Tests\rabbit_hole\FunctionalCode
public function testLoadBundleSettingsWithDefault() {
// We search for a bundle that doesn't exist (named from a UUID) expecting
// to receive the default value.
$action = $this->behaviorSettingsManager
->loadBehaviorSettingsAsConfig(self::DEFAULT_TEST_ENTITY, 'f4515736-cfa0-4e38-b3ed-1306f56bd2a1')
->get('action');
$this
->assertEquals($action, self::DEFAULT_BUNDLE_ACTION, 'Unexpected default action');
}