function DisplayVariantTest::testSubmitConfigurationForm
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php \Drupal\Tests\Core\Display\DisplayVariantTest::testSubmitConfigurationForm()
- 10 core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php \Drupal\Tests\Core\Display\DisplayVariantTest::testSubmitConfigurationForm()
- 11.x core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php \Drupal\Tests\Core\Display\DisplayVariantTest::testSubmitConfigurationForm()
Tests the submitConfigurationForm() method.
@covers ::submitConfigurationForm
File
-
core/
tests/ Drupal/ Tests/ Core/ Display/ DisplayVariantTest.php, line 135
Class
- DisplayVariantTest
- @coversDefaultClass \Drupal\Core\Display\VariantBase @group Display
Namespace
Drupal\Tests\Core\DisplayCode
public function testSubmitConfigurationForm() {
$display_variant = $this->setUpDisplayVariant();
$this->assertSame('', $display_variant->label());
$form = [];
$label = $this->randomMachineName();
$form_state = new FormState();
$form_state->setValue('label', $label);
$display_variant->submitConfigurationForm($form, $form_state);
$this->assertSame($label, $display_variant->label());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.