You are here

public function SlickFormatterTest::testBuildSettings in Slick Carousel 8.2

Same name and namespace in other branches
  1. 8 tests/src/Kernel/SlickFormatterTest.php \Drupal\Tests\slick\Kernel\SlickFormatterTest::testBuildSettings()

Tests for \Drupal\slick\SlickFormatter.

@covers \Drupal\slick\SlickFormatter::buildSettings @dataProvider providerTestBuildSettings

Parameters

array $settings: The settings being tested.

mixed|bool|string $expected: The expected output.

File

tests/src/Kernel/SlickFormatterTest.php, line 168

Class

SlickFormatterTest
Tests the Slick field rendering using the image field type.

Namespace

Drupal\Tests\slick\Kernel

Code

public function testBuildSettings(array $settings, $expected) {
  $format['settings'] = array_merge($this
    ->getFormatterSettings(), $settings) + SlickDefault::extendedSettings();
  $this->slickFormatter
    ->buildSettings($format, $this->testItems);
  $this
    ->assertArrayHasKey('bundle', $format['settings']);
}