You are here

public function BlazyAdminFormatterUnitTest::testBuildSettingsForm in Blazy 8

Same name and namespace in other branches
  1. 8.2 tests/src/Unit/Form/BlazyAdminFormatterUnitTest.php \Drupal\Tests\blazy\Unit\Form\BlazyAdminFormatterUnitTest::testBuildSettingsForm()

@covers ::buildSettingsForm @covers ::openingForm @covers ::imageStyleForm @covers ::mediaSwitchForm @covers ::gridForm @covers ::breakpointsForm @covers ::closingForm @covers ::finalizeForm

File

tests/src/Unit/Form/BlazyAdminFormatterUnitTest.php, line 71

Class

BlazyAdminFormatterUnitTest
Tests the Blazy admin formatter form.

Namespace

Drupal\Tests\blazy\Unit\Form

Code

public function testBuildSettingsForm() {
  $form = [];
  $definition = $this
    ->getDefaulEntityFormatterDefinition() + $this
    ->getDefaultFormatterDefinition();
  $definition['settings'] += $this
    ->getDefaultFields(TRUE);
  $this->blazyAdminFormatter
    ->buildSettingsForm($form, $definition);
  $this
    ->assertArrayHasKey('closing', $form);
}