function ViewsMultiValueFieldUpdateTest::testViewsPostUpdateFieldNamesForMultiValueFields
Tests views_post_update_field_names_for_multivalue_fields().
File
-
core/
modules/ views/ tests/ src/ Functional/ Update/ ViewsMultiValueFieldUpdateTest.php, line 42
Class
- ViewsMultiValueFieldUpdateTest
- Tests the update path base class.
Namespace
Drupal\Tests\views\Functional\UpdateCode
public function testViewsPostUpdateFieldNamesForMultiValueFields() {
$key_value_store = \Drupal::keyValue('post_update');
$existing_update_functions = $key_value_store->get('existing_updates', []);
$existing_update_functions = array_diff($existing_update_functions, [
'views_post_update_field_names_for_multivalue_fields',
]);
$key_value_store->set('existing_updates', $existing_update_functions);
$this->runUpdates();
$this->assertSession()
->pageTextContainsOnce('Updates failed for the entity type View, for test_another_broken_config_multi_value, test_broken_config_multi_value. Check the logs.');
$this->drupalLogin($this->rootUser);
$this->drupalGet('admin/reports/dblog', [
'query' => [
'type[]' => 'update',
],
]);
$this->assertSession()
->pageTextMatchesCount(2, '/Unable to update view test_broken_config_multi_value/');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.