function EntityFormModeUpdatePathTest::testRunUpdates
Tests update path for the entity form mode description value from '' to NULL.
File
-
core/
modules/ system/ tests/ src/ Functional/ Update/ EntityFormModeUpdatePathTest.php, line 30
Class
- EntityFormModeUpdatePathTest
- Tests update path for the entity form mode description value from '' to NULL.
Namespace
Drupal\Tests\system\Functional\UpdateCode
public function testRunUpdates() : void {
$form_mode = EntityFormMode::load('user.register');
$this->assertInstanceOf(EntityFormMode::class, $form_mode);
$this->assertSame("\n", $form_mode->get('description'));
$this->assertSame("\n", $form_mode->getDescription());
$this->runUpdates();
$form_mode = EntityFormMode::load('user.register');
$this->assertInstanceOf(EntityFormMode::class, $form_mode);
$this->assertNull($form_mode->get('description'));
// Assert backward compatibility of EntityFormMode::getDescription().
$this->assertSame('', $form_mode->getDescription());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.