Skip to content

Commit

Permalink
Modularize bootstrap data
Browse files Browse the repository at this point in the history
  • Loading branch information
doctordesh committed Dec 29, 2014
1 parent e8d12a1 commit f7a5e84
Show file tree
Hide file tree
Showing 2 changed files with 258 additions and 11 deletions.
4 changes: 1 addition & 3 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ public function get_results($sql) {
if(strpos($sql, 'IN (2)') !== false) {
$data = unserialize(serialize(DATA::$POST_1));
} else {
//$data = unserialize('a:17:{i:0;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:10:"info_image";s:10:"meta_value";s:1:"4";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:11:"image_media";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:1;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:10:"info_title";s:10:"meta_value";s:3:"asd";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"1";s:10:"field_type";s:7:"textbox";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:2;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:10:"info_title";s:10:"meta_value";s:3:"qwe";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"1";s:10:"field_type";s:7:"textbox";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:3;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:9:"test_file";s:10:"meta_value";s:29:"1397294301Bonnr1190009484.pdf";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:4:"file";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:4;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:12:"test_checker";s:10:"meta_value";s:1:"1";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:8:"checkbox";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:5;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:11:"test_select";s:10:"meta_value";s:25:"a:1:{i:0;s:8:"Option 2";}";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:8:"dropdown";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:6;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:15:"test_checkboxes";s:10:"meta_value";s:25:"a:1:{i:0;s:8:"Option 1";}";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:13:"checkbox_list";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:7;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:12:"test_related";s:10:"meta_value";s:1:"2";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:12:"related_type";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:8;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:10:"info_image";s:10:"meta_value";s:1:"4";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:11:"image_media";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:9;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:10:"info_title";s:10:"meta_value";s:9:"caption 1";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"1";s:10:"field_type";s:7:"textbox";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:10;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:10:"info_title";s:10:"meta_value";s:9:"caption 2";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"1";s:10:"field_type";s:7:"textbox";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:11;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:10:"info_title";s:10:"meta_value";s:9:"caption 3";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"1";s:10:"field_type";s:7:"textbox";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:12;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:9:"test_file";s:10:"meta_value";s:29:"1397294593Bonnr1190009484.pdf";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:4:"file";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:13;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:12:"test_checker";s:10:"meta_value";s:1:"1";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:8:"checkbox";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:14;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:11:"test_select";s:10:"meta_value";s:25:"a:1:{i:0;s:8:"Option 1";}";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:8:"dropdown";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:15;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:15:"test_checkboxes";s:10:"meta_value";s:25:"a:1:{i:0;s:8:"Option 2";}";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:13:"checkbox_list";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:16;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:12:"test_related";s:10:"meta_value";s:1:"2";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:12:"related_type";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}}');
$data = unserialize('a:18:{i:0;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:10:"info_image";s:10:"meta_value";s:1:"4";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:11:"image_media";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:1;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:10:"info_title";s:10:"meta_value";s:3:"asd";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"1";s:10:"field_type";s:7:"textbox";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:2;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:10:"info_title";s:10:"meta_value";s:3:"qwe";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"1";s:10:"field_type";s:7:"textbox";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:3;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:9:"test_file";s:10:"meta_value";s:29:"1397294301Bonnr1190009484.pdf";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:4:"file";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:4;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:12:"test_checker";s:10:"meta_value";s:1:"1";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:8:"checkbox";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:5;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:11:"test_select";s:10:"meta_value";s:25:"a:1:{i:0;s:8:"Option 2";}";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:8:"dropdown";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:6;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:15:"test_checkboxes";s:10:"meta_value";s:25:"a:1:{i:0;s:8:"Option 1";}";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:13:"checkbox_list";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:7;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:12:"test_related";s:10:"meta_value";s:1:"2";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:12:"related_type";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:8;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:10:"info_image";s:10:"meta_value";s:1:"4";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:11:"image_media";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:9;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:10:"info_title";s:10:"meta_value";s:9:"caption 1";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"1";s:10:"field_type";s:7:"textbox";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:10;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:10:"info_title";s:10:"meta_value";s:9:"caption 2";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"1";s:10:"field_type";s:7:"textbox";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:11;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:10:"info_title";s:10:"meta_value";s:9:"caption 3";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"1";s:10:"field_type";s:7:"textbox";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:12;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:9:"test_file";s:10:"meta_value";s:29:"1397294593Bonnr1190009484.pdf";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:4:"file";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:13;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:12:"test_checker";s:10:"meta_value";s:1:"1";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:8:"checkbox";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:14;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:11:"test_select";s:10:"meta_value";s:25:"a:1:{i:0;s:8:"Option 1";}";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:8:"dropdown";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:15;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:15:"test_checkboxes";s:10:"meta_value";s:25:"a:1:{i:0;s:8:"Option 2";}";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:13:"checkbox_list";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:16;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:12:"test_related";s:10:"meta_value";s:1:"2";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:12:"related_type";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:17;O:8:"stdClass":8:{s:2:"ID";i:7;s:8:"meta_key";s:12:"test_content";s:10:"meta_value";s:15:"this is content";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:9:"multiline";s:10:"group_name";s:4:"test";s:16:"group_duplicated";i:1;}}');
$data = unserialize('a:19:{i:0;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:10:"info_image";s:10:"meta_value";s:1:"4";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:11:"image_media";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:1;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:10:"info_title";s:10:"meta_value";s:3:"asd";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"1";s:10:"field_type";s:7:"textbox";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:2;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:10:"info_title";s:10:"meta_value";s:3:"qwe";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"1";s:10:"field_type";s:7:"textbox";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:3;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:9:"test_file";s:10:"meta_value";s:29:"1397294301Bonnr1190009484.pdf";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:4:"file";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:4;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:12:"test_checker";s:10:"meta_value";s:1:"1";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:8:"checkbox";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:5;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:11:"test_select";s:10:"meta_value";s:25:"a:1:{i:0;s:8:"Option 2";}";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:8:"dropdown";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:6;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:15:"test_checkboxes";s:10:"meta_value";s:25:"a:1:{i:0;s:8:"Option 1";}";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:13:"checkbox_list";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:7;O:8:"stdClass":8:{s:2:"ID";s:1:"2";s:8:"meta_key";s:12:"test_related";s:10:"meta_value";s:1:"2";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:12:"related_type";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:8;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:10:"info_image";s:10:"meta_value";s:1:"4";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:11:"image_media";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:9;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:10:"info_title";s:10:"meta_value";s:9:"caption 1";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"1";s:10:"field_type";s:7:"textbox";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:10;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:10:"info_title";s:10:"meta_value";s:9:"caption 2";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"1";s:10:"field_type";s:7:"textbox";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:11;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:10:"info_title";s:10:"meta_value";s:9:"caption 3";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"1";s:10:"field_type";s:7:"textbox";s:10:"group_name";s:4:"info";s:16:"group_duplicated";s:1:"0";}i:12;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:9:"test_file";s:10:"meta_value";s:29:"1397294593Bonnr1190009484.pdf";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:4:"file";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:13;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:12:"test_checker";s:10:"meta_value";s:1:"1";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:8:"checkbox";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:14;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:11:"test_select";s:10:"meta_value";s:25:"a:1:{i:0;s:8:"Option 1";}";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:8:"dropdown";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:15;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:15:"test_checkboxes";s:10:"meta_value";s:25:"a:1:{i:0;s:8:"Option 2";}";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:13:"checkbox_list";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:16;O:8:"stdClass":8:{s:2:"ID";s:1:"7";s:8:"meta_key";s:12:"test_related";s:10:"meta_value";s:1:"2";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:12:"related_type";s:10:"group_name";s:4:"test";s:16:"group_duplicated";s:1:"1";}i:17;O:8:"stdClass":8:{s:2:"ID";i:7;s:8:"meta_key";s:12:"test_content";s:10:"meta_value";s:15:"this is content";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:9:"multiline";s:10:"group_name";s:4:"test";s:16:"group_duplicated";i:1;}i:18;O:8:"stdClass":8:{s:2:"ID";i:7;s:8:"meta_key";s:12:"test_content";s:10:"meta_value";s:15:"this is content";s:11:"group_count";s:1:"1";s:16:"field_duplicated";s:1:"0";s:10:"field_type";s:15:"markdown_editor";s:10:"group_name";s:4:"test";s:16:"group_duplicated";i:1;}}');
$data = unserialize(serialize(DATA::$POSTS));
}

return $data;
Expand Down
Loading

0 comments on commit f7a5e84

Please sign in to comment.