2012-09-21 00:45:16 +00:00
< ? php
/**
* @ file
* Database additions for system tests . Used in upgrade . system . test .
*
* This dump only contains data and schema components relevant for system
* functionality . The drupal - 7. filled . bare . php file is imported before
* this dump , so the two form the database structure expected in tests
* altogether .
*/
// Add non-default system settings.
db_insert ( 'variable' ) -> fields ( array (
2013-03-07 10:48:27 +00:00
'name' ,
'value' ,
))
-> values ( array (
'name' => 'cache' ,
'value' => 'i:1;' ,
))
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'cache_lifetime' ,
'value' => 's:5:"10800";' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'page_cache_maximum_age' ,
'value' => 's:4:"1800";' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'page_compression' ,
'value' => 'i:1;' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'preprocess_css' ,
'value' => 'i:1;' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'preprocess_js' ,
'value' => 'i:1;' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'cron_safe_threshold' ,
'value' => 's:5:"86400";' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'cron_threshold_warning' ,
'value' => 's:5:"86400";' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'cron_threshold_error' ,
'value' => 's:6:"172800";' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'error_level' ,
'value' => 's:1:"1";' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'maintenance_mode' ,
'value' => 'i:1;' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'maintenance_mode_message' ,
'value' => 's:22:"Testing config upgrade"' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'feed_default_items' ,
'value' => 's:2:"20";' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'feed_description' ,
'value' => 's:22:"Testing config upgrade";' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'feed_item_length' ,
'value' => 's:6:"teaser";' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'site_403' ,
'value' => 's:3:"403";' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'site_404' ,
'value' => 's:3:"404";' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'site_frontpage' ,
'value' => 's:4:"node";' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-09-21 00:45:16 +00:00
'name' => 'site_slogan' ,
'value' => 's:31:"CMI makes Drupal 8 drush cex -y";' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
'name' => 'user_cancel_method' ,
'value' => 's:20:"user_cancel_reassign"' ,
2012-11-13 22:27:58 +00:00
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-12-13 12:18:30 +00:00
'name' => 'taxonomy_override_selector' ,
'value' => 'i:1;' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-12-13 12:18:30 +00:00
'name' => 'taxonomy_terms_per_page_admin' ,
'value' => 'i:32;' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
2012-12-13 12:18:30 +00:00
'name' => 'taxonomy_maintain_index_table' ,
'value' => 'i:0;' ,
2012-11-24 08:12:43 +00:00
))
2013-03-07 10:48:27 +00:00
-> values ( array (
'name' => 'filter_allowed_protocols' ,
'value' => 'a:4:{i:0;s:4:"http";i:1;s:5:"https";i:2;s:3:"ftp";i:3;s:6:"mailto";}' ,
))
-> values ( array (
2012-11-24 08:12:43 +00:00
'name' => 'password_count_log2' ,
'value' => 'i:42;' ,
2013-03-07 10:48:27 +00:00
))
-> values ( array (
2012-12-07 17:57:03 +00:00
'name' => 'actions_max_stack' ,
'value' => 'i:42;' ,
))
2013-03-07 10:48:27 +00:00
-> values ( array (
'name' => 'mail_system' ,
'value' => 'a:2:{s:14:"default-system";s:17:"DefaultMailSystem";s:7:"maillog";s:17:"MaillogMailSystem";}' ,
))
2013-03-10 19:14:36 +00:00
-> values ( array (
'name' => 'fast_404_paths' ,
'value' => 's:74:"/\.(?:txt|png|gif|jpe?g|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|aspi|pdf)$/i";' ,
))
-> values ( array (
'name' => 'fast_404_excluded_paths' ,
'value' => 's:27:"/\/(?:styles|imagecache)\//";' ,
))
-> values ( array (
'name' => 'fast_404_html' ,
'value' => 's:168:"<!DOCTYPE html><html><head><title>Page Not Found</title></head><body><h1>Page Not Found</h1><p>The requested URL "@path" was not found on this server.</p></body></html>";' ,
))
2013-03-07 10:48:27 +00:00
-> execute ();
2012-09-21 00:45:16 +00:00
db_update ( 'variable' )
-> fields ( array ( 'value' => 's:18:"config@example.com";' ))
-> condition ( 'name' , 'site_mail' )
-> execute ();
db_update ( 'variable' )
2013-03-07 10:48:27 +00:00
-> fields ( array ( 'value' => 's:22:"Testing config upgrade";' ))
-> condition ( 'name' , 'site_name' )
-> execute ();
2012-11-13 22:27:58 +00:00
db_update ( 'variable' )
-> fields ( array ( 'value' => 's:10:"plain_text";' ))
-> condition ( 'name' , 'filter_fallback_format' )
-> execute ();
2013-02-27 23:18:37 +00:00
db_update ( 'variable' )
2013-03-10 19:27:34 +00:00
-> fields ( array ( 'value' => 'a:2:{i:0;s:4:"test";i:1;s:4:"book";}' ))
2013-02-27 23:18:37 +00:00
-> condition ( 'name' , 'book_allowed_types' )
-> execute ();
2013-02-22 11:18:33 +00:00
// color module in bartik
$palette = array (
'top' => '#8eccf2' ,
'bottom' => '#48a9e4' ,
'bg' => '#ffffff' ,
'sidebar' => '#f6f6f2' ,
'sidebarborders' => '#f9f9f9' ,
'footer' => '#db2a2a' ,
'titleslogan' => '#fffeff' ,
'text' => '#fb8484' ,
'link' => '#3587b7' ,
);
db_insert ( 'variable' ) -> fields ( array (
2013-03-07 10:48:27 +00:00
'name' ,
'value' ,
))
2013-02-22 11:18:33 +00:00
-> values ( array (
2013-03-07 10:48:27 +00:00
'name' => 'color_bartik_files' ,
'value' => serialize ( array ( 'public://color/bartik-09696463/logo.png' , 'public://color/bartik-09696463/colors.css' )),
))
2013-02-22 11:18:33 +00:00
-> values ( array (
2013-03-07 10:48:27 +00:00
'name' => 'color_bartik_logo' ,
'value' => serialize ( 'public://color/bartik-09696463/logo.png' ),
))
2013-02-22 11:18:33 +00:00
-> values ( array (
2013-03-07 10:48:27 +00:00
'name' => 'color_bartik_palette' ,
'value' => serialize ( $palette ),
))
2013-02-22 11:18:33 +00:00
-> values ( array (
2013-03-07 10:48:27 +00:00
'name' => 'color_bartik_stylesheets' ,
'value' => serialize ( 'public://color/bartik-09696463/colors.css' ),
))
2013-02-22 11:18:33 +00:00
-> execute ();
// color module with faked seven upgrade path to test screenshot option
db_insert ( 'variable' ) -> fields ( array (
2013-03-07 10:48:27 +00:00
'name' ,
'value' ,
))
2013-02-22 11:18:33 +00:00
-> values ( array (
2013-03-07 10:48:27 +00:00
'name' => 'color_seven_files' ,
'value' => serialize ( array ( 'public://color/seven-09696463/logo.png' , 'public://color/seven-09696463/colors.css' )),
))
2013-02-22 11:18:33 +00:00
-> values ( array (
2013-03-07 10:48:27 +00:00
'name' => 'color_seven_logo' ,
'value' => serialize ( 'public://color/seven-09696463/logo.png' ),
))
2013-02-22 11:18:33 +00:00
-> values ( array (
2013-03-07 10:48:27 +00:00
'name' => 'color_seven_palette' ,
'value' => serialize ( $palette ),
))
2013-02-22 11:18:33 +00:00
-> values ( array (
2013-03-07 10:48:27 +00:00
'name' => 'color_seven_stylesheets' ,
'value' => serialize ( 'public://color/seven-09696463/colors.css' ),
))
2013-02-22 11:18:33 +00:00
-> values ( array (
2013-03-07 10:48:27 +00:00
'name' => 'color_seven_screenshot' ,
'value' => serialize ( 'public://color/seven-09696463/dummy-screenshot.png' ),
))
2013-02-22 11:18:33 +00:00
-> execute ();