1. 8.2.x core/modules/contact/tests/drupal-7.contact.database.php
  2. 8.0.x core/modules/contact/tests/drupal-7.contact.database.php
  3. 8.1.x core/modules/contact/tests/drupal-7.contact.database.php
  4. 8.3.x core/modules/contact/tests/drupal-7.contact.database.php

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.

File

core/modules/contact/tests/drupal-7.contact.database.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Database additions for Drupal\contact\Tests\ContactUpgradePathTest.
  5. *
  6. * This dump only contains data for the contact module. The
  7. * drupal-7.filled.bare.php file is imported before this dump, so the two form
  8. * the database structure expected in tests altogether.
  9. */
  10. // Update the default category to that it is not selected.
  11. db_update('contact')
  12. ->fields(array('selected' => '0'))
  13. ->condition('cid', '1')
  14. ->execute();
  15. // Add a custom contact category.
  16. db_insert('contact')->fields(array(
  17. 'category',
  18. 'recipients',
  19. 'reply',
  20. 'weight',
  21. 'selected'
  22. ))
  23. ->values(array(
  24. 'category' => 'Upgrade test',
  25. 'recipients' => 'test1@example.com,test2@example.com',
  26. 'reply' => 'Test reply',
  27. 'weight' => 1,
  28. 'selected' => 1,
  29. ))
  30. ->execute();