You are here

public function LinksWidgetTest::testDefaultConfiguration in Facets 8

Tests default configuration.

Overrides WidgetTestBase::testDefaultConfiguration

File

tests/src/Unit/Plugin/widget/LinksWidgetTest.php, line 228

Class

LinksWidgetTest
Unit test for widget.

Namespace

Drupal\Tests\facets\Unit\Plugin\widget

Code

public function testDefaultConfiguration() {
  $default_config = $this->widget
    ->defaultConfiguration();
  $this
    ->assertArrayHasKey('show_numbers', $default_config);
  $this
    ->assertArrayHasKey('soft_limit', $default_config);
  $this
    ->assertArrayHasKey('show_reset_link', $default_config);
  $this
    ->assertArrayHasKey('reset_text', $default_config);
  $this
    ->assertArrayHasKey('soft_limit_settings', $default_config);
  $this
    ->assertArrayHasKey('show_less_label', $default_config['soft_limit_settings']);
  $this
    ->assertArrayHasKey('show_more_label', $default_config['soft_limit_settings']);
  $this
    ->assertEquals(FALSE, $default_config['show_numbers']);
  $this
    ->assertEquals(0, $default_config['soft_limit']);
  $this
    ->assertEquals(FALSE, $default_config['show_reset_link']);
}