comparison core/modules/contact/tests/drupal-7.contact.database.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children 129ea1e6d783
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 /**
4 * @file
5 * Database additions for Drupal\contact\Tests\ContactUpgradePathTest.
6 *
7 * This dump only contains data for the contact module. The
8 * drupal-7.filled.bare.php file is imported before this dump, so the two form
9 * the database structure expected in tests altogether.
10 */
11
12 // Update the default category to that it is not selected.
13 db_update('contact')
14 ->fields(['selected' => '0'])
15 ->condition('cid', '1')
16 ->execute();
17
18 // Add a custom contact category.
19 db_insert('contact')->fields([
20 'category',
21 'recipients',
22 'reply',
23 'weight',
24 'selected'
25 ])
26 ->values([
27 'category' => 'Upgrade test',
28 'recipients' => 'test1@example.com,test2@example.com',
29 'reply' => 'Test reply',
30 'weight' => 1,
31 'selected' => 1,
32 ])
33 ->execute();