You are here

public function RabbitHoleBehaviorSettingsTest::testBundleSettingsDefault in Rabbit Hole 8

Same name and namespace in other branches
  1. 2.x tests/src/Functional/RabbitHoleBehaviorSettingsTest.php \Drupal\Tests\rabbit_hole\Functional\RabbitHoleBehaviorSettingsTest::testBundleSettingsDefault()

Test that the default bundle settings exist and have the expected values.

File

tests/src/Functional/RabbitHoleBehaviorSettingsTest.php, line 82

Class

RabbitHoleBehaviorSettingsTest
Test the RabbitHoleBehaviorSettings configuration entity functionality.

Namespace

Drupal\Tests\rabbit_hole\Functional

Code

public function testBundleSettingsDefault() {
  $settings = \Drupal::config('rabbit_hole.behavior_settings.default');
  $this
    ->assertEquals(self::DEFAULT_BUNDLE_ACTION, $settings
    ->get('action'), 'Unexpected default action');
  $this
    ->assertEquals(self::DEFAULT_BUNDLE_OVERRIDE, $settings
    ->get('allow_override'), 'Unexpected default override');
  $this
    ->assertEquals(self::DEFAULT_BUNDLE_REDIRECT_CODE, $settings
    ->get('redirect_code'), 'Unexpected default redirect');
}