public function DisplayVariantTest::testSubmitConfigurationForm in Drupal 10
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Display/DisplayVariantTest.php \Drupal\Tests\Core\Display\DisplayVariantTest::testSubmitConfigurationForm()
- 9 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());
}