function NullDefaultFormTest::testRunUpdates

Tests the upgrade path for updating empty 'default_form' to NULL.

File

core/modules/contact/tests/src/Functional/Update/NullDefaultFormTest.php, line 29

Class

NullDefaultFormTest
Tests the upgrade path for making 'default_form' in 'contact.settings' config to NULL.

Namespace

Drupal\Tests\contact\Functional\Update

Code

public function testRunUpdates() : void {
    $this->config('contact.settings')
        ->set('default_form', '')
        ->save();
    $this->assertSame('', $this->config('contact.settings')
        ->get('default_form'));
    $this->runUpdates();
    $this->assertNull($this->config('contact.settings')
        ->get('default_form'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.