annotate core/modules/contact/tests/drupal-7.contact.database.php @ 15:e200cb7efeb3
Update Drupal core to 8.5.3 via Composer
author |
Chris Cannam |
date |
Thu, 26 Apr 2018 11:26:54 +0100 |
parents |
4c8ae668cc8c |
children |
129ea1e6d783 |
rev |
line source |
Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 /**
|
Chris@0
|
4 * @file
|
Chris@0
|
5 * Database additions for Drupal\contact\Tests\ContactUpgradePathTest.
|
Chris@0
|
6 *
|
Chris@0
|
7 * This dump only contains data for the contact module. The
|
Chris@0
|
8 * drupal-7.filled.bare.php file is imported before this dump, so the two form
|
Chris@0
|
9 * the database structure expected in tests altogether.
|
Chris@0
|
10 */
|
Chris@0
|
11
|
Chris@0
|
12 // Update the default category to that it is not selected.
|
Chris@0
|
13 db_update('contact')
|
Chris@0
|
14 ->fields(['selected' => '0'])
|
Chris@0
|
15 ->condition('cid', '1')
|
Chris@0
|
16 ->execute();
|
Chris@0
|
17
|
Chris@0
|
18 // Add a custom contact category.
|
Chris@0
|
19 db_insert('contact')->fields([
|
Chris@0
|
20 'category',
|
Chris@0
|
21 'recipients',
|
Chris@0
|
22 'reply',
|
Chris@0
|
23 'weight',
|
Chris@0
|
24 'selected'
|
Chris@0
|
25 ])
|
Chris@0
|
26 ->values([
|
Chris@0
|
27 'category' => 'Upgrade test',
|
Chris@0
|
28 'recipients' => 'test1@example.com,test2@example.com',
|
Chris@0
|
29 'reply' => 'Test reply',
|
Chris@0
|
30 'weight' => 1,
|
Chris@0
|
31 'selected' => 1,
|
Chris@0
|
32 ])
|
Chris@0
|
33 ->execute();
|