Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/contact/tests/drupal-7.contact.database.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
7 * This dump only contains data for the contact module. The | 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 | 8 * drupal-7.filled.bare.php file is imported before this dump, so the two form |
9 * the database structure expected in tests altogether. | 9 * the database structure expected in tests altogether. |
10 */ | 10 */ |
11 | 11 |
12 $connection = \Drupal::database(); | |
12 // Update the default category to that it is not selected. | 13 // Update the default category to that it is not selected. |
13 db_update('contact') | 14 $connection->update('contact') |
14 ->fields(['selected' => '0']) | 15 ->fields(['selected' => '0']) |
15 ->condition('cid', '1') | 16 ->condition('cid', '1') |
16 ->execute(); | 17 ->execute(); |
17 | 18 |
18 // Add a custom contact category. | 19 // Add a custom contact category. |
19 db_insert('contact')->fields([ | 20 $connection->insert('contact')->fields([ |
20 'category', | 21 'category', |
21 'recipients', | 22 'recipients', |
22 'reply', | 23 'reply', |
23 'weight', | 24 'weight', |
24 'selected', | 25 'selected', |