Mercurial > hg > isophonics-drupal-site
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/modules/contact/tests/drupal-7.contact.database.php Wed Nov 29 16:09:58 2017 +0000 @@ -0,0 +1,33 @@ +<?php + +/** + * @file + * Database additions for Drupal\contact\Tests\ContactUpgradePathTest. + * + * This dump only contains data for the contact module. The + * drupal-7.filled.bare.php file is imported before this dump, so the two form + * the database structure expected in tests altogether. + */ + +// Update the default category to that it is not selected. +db_update('contact') + ->fields(['selected' => '0']) + ->condition('cid', '1') + ->execute(); + +// Add a custom contact category. +db_insert('contact')->fields([ + 'category', + 'recipients', + 'reply', + 'weight', + 'selected' +]) + ->values([ + 'category' => 'Upgrade test', + 'recipients' => 'test1@example.com,test2@example.com', + 'reply' => 'Test reply', + 'weight' => 1, + 'selected' => 1, +]) + ->execute();