function BlockContentUpdateTest::testCustomBlockLibraryPathOverridden
Same name in other branches
- 10 core/modules/block_content/tests/src/Functional/Update/BlockContentUpdateTest.php \Drupal\Tests\block_content\Functional\Update\BlockContentUpdateTest::testCustomBlockLibraryPathOverridden()
Tests the block_content view isn't updated if the path has been modified.
See also
block_content_post_update_move_custom_block_library()
File
-
core/
modules/ block_content/ tests/ src/ Functional/ Update/ BlockContentUpdateTest.php, line 94
Class
- BlockContentUpdateTest
- Tests update functions for the Block Content module.
Namespace
Drupal\Tests\block_content\Functional\UpdateCode
public function testCustomBlockLibraryPathOverridden() : void {
$view = View::load('block_content');
$display =& $view->getDisplay('page_1');
$display['display_options']['path'] = 'some/custom/path';
$view->save();
$this->runUpdates();
$view = View::load('block_content');
$data = $view->toArray();
$this->assertEquals('some/custom/path', $data['display']['page_1']['display_options']['path']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.