Version 1
[yaffs-website] / web / core / modules / system / tests / fixtures / update / drupal8.views-image-style-dependency-2649914.php
1 <?php
2
3 /**
4  * @file
5  * Contains database additions to drupal-8-rc1.bare.standard.php.gz for testing
6  * the upgrade path of https://www.drupal.org/node/2649914.
7  */
8
9 use Drupal\Core\Database\Database;
10 use Drupal\Core\Serialization\Yaml;
11
12 $connection = Database::getConnection();
13
14 $views_config = Yaml::decode(file_get_contents(__DIR__ . '/drupal8.views-image-style-dependency-2649914.yml'));
15
16 $connection->insert('config')
17   ->fields(['collection', 'name', 'data'])
18   ->values([
19     'collection' => '',
20     'name' => 'views.view.' . $views_config['id'],
21     'data' => serialize($views_config),
22   ])->execute();