Esempio n. 1
0
 function setUp()
 {
     parent::setUp();
     require_code('banners');
     require_code('banners2');
     require_code('submit');
 }
Esempio n. 2
0
 function setUp()
 {
     parent::setUp();
     require_code('flagrant');
     $this->flag_id = add_flagrant('test', 3, 'Welcome to ocPortal', 1);
     $this->assertTrue('Welcome to ocPortal' == $GLOBALS['SITE_DB']->query_value('text', 'notes', array('id' => $this->flag_id)));
 }
Esempio n. 3
0
 function setUp()
 {
     parent::setUp();
     require_code('iotds');
     $this->iotd_id = add_iotd('http://google.com', 'welcome', 'Google', 'images/google.jpg', 0, 0, 0, 0, 'Notes ?', NULL, NULL, 0, NULL, 0, NULL);
     $this->assertTrue('http://google.com' == $GLOBALS['SITE_DB']->query_value('iotd', 'url', array('id' => $this->iotd_id)));
 }
Esempio n. 4
0
 function setUp()
 {
     if (function_exists('set_time_limit')) {
         @set_time_limit(0);
     }
     parent::setUp();
 }
Esempio n. 5
0
 function setUp()
 {
     parent::setUp();
     require_code('ecommerce');
     require_code('autosave');
     require_code('shopping');
     require_code('form_templates');
     require_lang('ecommerce');
     $this->access_mapping = array(db_get_first_id() => 4);
     // Creating cms catalogues object
     require_code('adminzone/pages/modules/admin_ecommerce.php');
     $this->admin_ecom = new Module_admin_ecommerce();
     /*require_code('adminzone/pages/modules/admin_shipping.php');
     		$this->admin_shipping	=	new Module_admin_shipping();
     		$this->admin_shipping->run_start('misc');*/
     /*require_code('adminzone/pages/modules_custom/admin_credits.php');
     		$this->admin_credits		=	new Module_admin_credits();*/
     require_code('adminzone/pages/modules/admin_orders.php');
     $this->admin_orders = new Module_admin_orders();
     $this->admin_orders->run();
     $GLOBALS['SITE_DB']->query_insert('shopping_order', array('c_member' => get_member(), 'session_id' => get_session_id(), 'add_date' => time(), 'tot_price' => 0.0, 'order_status' => 'NEW', 'notes' => '', 'transaction_id' => 'ddfsfdsdfsdfs', 'purchase_through' => 'paypal', 'tax_opted_out' => 0));
     /*require_code('adminzone/pages/modules/admin_permissions_products.php');
     		$this->admin_permission_products		=	new Module_admin_permissions_products();
     		$this->admin_permission_products->run();*/
 }
Esempio n. 6
0
 function setUp()
 {
     parent::setUp();
     require_code('ecommerce');
     require_code('catalogues');
     require_code('catalogues2');
     require_code('shopping');
     require_lang('catalogues');
     require_lang('shopping');
     require_lang('ecommerce');
     if (!is_null($GLOBALS['SITE_DB']->query_value_null_ok('catalogues', 'c_name', array('c_name' => 'storetesting' . strval(get_member()))))) {
         actual_delete_catalogue('storetesting' . strval(get_member()));
     }
     $this->access_mapping = array(db_get_first_id() => 4);
     // Creating cms catalogues object
     require_code('cms/pages/modules/cms_catalogues.php');
     $this->cms_cat = new Module_cms_catalogues();
     //Creating Shopping cart object
     require_code('site/pages/modules/shopping.php');
     $this->shopping_cart = new Module_shopping();
     $username = $GLOBALS['FORUM_DRIVER']->get_username(get_member());
     $this->category_id = actual_add_catalogue('storetesting' . strval(get_member()), insert_lang(do_lang('DEFAULT_CATALOGUE_PRODUCTS_TITLE'), 2), '', 0, 1, '', 0, 1);
     $fields = array(array('ECOM_CAT_product_title', 'DESCRIPTION_TITLE', 'short_trans', 1, 1, 1, 1), array('ECOM_CAT_item_code', 'ECOM_CATD_item_code', 'random', 0, 1, 1, 1), array('ECOM_CAT_price_pre_tax', 'ECOM_CATD_price_pre_tax', 'float', 0, 1, 1, 1), array('ECOM_CAT_stock_level', 'ECOM_CATD_stock_level', 'integer', 0, 0, 1, 0), array('ECOM_CAT_stock_level_warn_at', 'ECOM_CATD_stock_level_warn_at', 'integer', 0, 0, 0, 0), array('ECOM_CAT_stock_level_maintain', 'ECOM_CATD_stock_level_maintain', 'tick', 0, 1, 0, 0), array('ECOM_CAT_tax_type', 'ECOM_CATD_tax_type', 'list', 0, 1, 0, 0, "0%|5%|17.5%", 0), array('ECOM_CAT_image', 'ECOM_CATD_image', 'picture', 0, 0, 1, 1), array('ECOM_CAT_weight', 'ECOM_CATD_weight', 'float', 0, 1, 0, 0), array('ECOM_CAT_description', 'DESCRIPTION_DESCRIPTION', 'long_trans', 0, 1, 1, 1));
     foreach ($fields as $i => $field) {
         actual_add_catalogue_field('storetesting' . strval(get_member()), lang_code_to_default_content($field[0], false, 3), lang_code_to_default_content($field[1], true, 3), $field[2] == 'tick' ? 'list' : $field[2], $i, $field[3], $field[5], $field[6], $field[2] == 'tick' ? do_lang('NO') . '|' . do_lang('YES') : (array_key_exists(7, $field) ? $field[7] : ''), $field[4], array_key_exists(5, $field) ? $field[5] : 0, array_key_exists(5, $field) ? $field[5] : 0);
     }
     $catalogue_name = 'storetesting' . strval(get_member());
     //Set Sample post values
     $fields = $GLOBALS['SITE_DB']->query_select('catalogue_fields', array('*'), array('c_name' => $catalogue_name));
     foreach ($fields as $key => $val) {
         $type = $val['cf_type'];
         $id = $val['id'];
         switch ($type) {
             case 'integer':
                 $_POST['field_' . strval($id)] = 4;
                 break;
             case 'short_trans':
                 $_POST['field_' . strval($id)] = 'Test field value';
                 break;
             case 'long_trans':
                 $_POST['field_' . strval($id)] = 'Test field value';
                 break;
             case 'float':
                 $_POST['field_' . strval($id)] = 68.34999999999999;
                 break;
             case 'list':
                 if ($val['cf_order'] = 6) {
                     //Order 6 is tax
                     $_POST['field_' . strval($id)] = 'Arizona=7.8%';
                 } elseif ($val['cf_order'] = 5) {
                     //Order 5 yes keep stock "yes/no"
                     $_POST['field_' . strval($id)] = 'yes';
                 }
                 break;
         }
     }
     $map = $this->cms_cat->get_set_field_map($catalogue_name);
     $this->product_id = actual_add_catalogue_entry($this->category_id, $validated = 0, $notes = 'test note', $allow_rating = 1, $allow_comments = 1, $allow_trackbacks = 1, $map);
 }
Esempio n. 7
0
 function setUp()
 {
     parent::setUp();
     require_code('catalogues');
     require_code('catalogues2');
     $this->cat_id = actual_add_catalogue_category('Testing_category', 'Test_Cat', 'Testing_Cat', '', 1, '', 30, 60, NULL, NULL, NULL);
     $this->assertTrue('Testing_category' == $GLOBALS['SITE_DB']->query_value('catalogue_categories', 'c_name ', array('id' => $this->cat_id)));
 }
Esempio n. 8
0
 function setUp()
 {
     parent::setUp();
     require_code('downloads');
     require_code('downloads2');
     $this->dwn_id = add_download(db_get_first_id(), '111', 'http://www.google.com', 'Testing download', 'sujith', '', 0, 1, 1, 1, 0, '', 'apple.jpeg', 110, 0, 0, NULL, NULL, 0, 0, NULL, NULL, NULL);
     $this->assertTrue('http://www.google.com' == $GLOBALS['SITE_DB']->query_value('download_downloads', 'url', array('id' => $this->dwn_id)));
 }
Esempio n. 9
0
 function setUp()
 {
     parent::setUp();
     require_code('galleries');
     require_code('galleries2');
     $this->glry_id = add_image('', '', '', 'http://www.msn.com', 'images/test.jpg', 0, 0, 0, 0, '', NULL, NULL, NULL, 0, NULL);
     $this->assertTrue('http://www.msn.com' == $GLOBALS['SITE_DB']->query_value('images', 'url', array('id' => $this->glry_id)));
 }
Esempio n. 10
0
 function setUp()
 {
     parent::setUp();
     require_code('menus2');
     $this->menu_id = add_menu_item('Test', 1, NULL, 'testing menu', 'www.ocportal.com', 1, 'downloads', 0, 1, 'testing');
     // Test the forum was actually created
     $this->assertTrue('Test' == $GLOBALS['SITE_DB']->query_value('menu_items', 'i_menu', array('id' => $this->menu_id)));
 }
Esempio n. 11
0
 function setUp()
 {
     parent::setUp();
     require_code('quiz');
     $this->quiz_id = add_quiz('Quiz1', 15, 'Begin', 'End', '', 'somethng', 60, time(), NULL, 1, 0, 'TEST', 1, 'Questions', NULL, 0, NULL);
     // Test the forum was actually created
     $this->assertTrue('Quiz1' == get_translated_text($GLOBALS['FORUM_DB']->query_value('quizzes', 'q_name', array('id' => $this->quiz_id))));
 }
Esempio n. 12
0
 function setUp()
 {
     parent::setUp();
     require_code('news');
     $this->news_id = add_news($title = 'Today', $news = "hiiiiiiiiiii", $author = 'rolly', $validated = 1, $allow_rating = 1, $allow_comments = 1, $allow_trackbacks = 1, $notes = '', $news_article = 'test article', $main_news_category = 5, $news_category = NULL, $time = '1262671781', $submitter = NULL, $views = 0, $edit_date = NULL, $id = NULL, $image = '');
     // Test the forum was actually created
     $this->assertTrue('Today' == get_translated_text($GLOBALS['SITE_DB']->query_value('news', 'title ', array('id' => $this->news_id))));
 }
Esempio n. 13
0
 function setUp()
 {
     parent::setUp();
     require_code('newsletter');
     $this->news_id = add_newsletter('New Offer', 'The new offer of the week.');
     // Test the forum was actually created
     $this->assertTrue('New Offer' == get_translated_text($GLOBALS['SITE_DB']->query_value('newsletters', 'title', array('id' => $this->news_id))));
 }
Esempio n. 14
0
 function setUp()
 {
     parent::setUp();
     require_code('bookmarks');
     $this->bookmark_id = add_bookmark(4, "xyz", "abc", "www.xyz.com");
     // Test the forum was actually created
     $this->assertTrue('abc' == $GLOBALS['SITE_DB']->query_value('bookmarks', 'b_title ', array('id' => $this->bookmark_id)));
 }
Esempio n. 15
0
 function setUp()
 {
     parent::setUp();
     require_code('news');
     $this->news_id = add_news_category('Today', 'news.gif', 'Headlines', NULL, NULL);
     // Test the forum was actually created
     $this->assertTrue('Today' == get_translated_text($GLOBALS['SITE_DB']->query_value('news_categories', 'nc_title ', array('id' => $this->news_id))));
 }
Esempio n. 16
0
 function setUp()
 {
     parent::setUp();
     require_code('calendar2');
     $this->event_id = add_calendar_event(8, '1', NULL, 0, 'test_event', '', 3, 1, 2010, 1, 10, 10, 15, 2010, NULL, 1, 1, 19, NULL, 1, 1, 1, 1, 1, '', NULL, 0, NULL, NULL, NULL);
     // Test the forum was actually created
     $this->assertTrue('test_event' == get_translated_text($GLOBALS['SITE_DB']->query_value('calendar_events', 'e_title ', array('id' => $this->event_id))));
 }
Esempio n. 17
0
 function setUp()
 {
     parent::setUp();
     require_code('downloads');
     require_code('downloads2');
     $this->dwn_cat_id = add_download_category('test', 1, 'test', 'test', '', NULL);
     $this->assertTrue('test' == $GLOBALS['SITE_DB']->query_value('download_categories', 'notes', array('id' => $this->dwn_cat_id)));
 }
Esempio n. 18
0
 function setUp()
 {
     parent::setUp();
     require_code('ecommerce');
     $this->usr_grp_id = add_usergroup_subscription('test', 'test', '123', 12, 'y', 1, 1, 1, ' ', ' ', ' ');
     // Test the forum was actually created
     $this->assertTrue(12 == $GLOBALS['FORUM_DB']->query_value('f_usergroup_subs', 's_length', array('id' => $this->usr_grp_id)));
 }
Esempio n. 19
0
 function setUp()
 {
     parent::setUp();
     require_code('calendar2');
     $this->eventtype_id = add_event_type('test_event_type', 'calendar/testtype', '');
     // Test the forum was actually created
     $this->assertTrue('test_event_type' == get_translated_text($GLOBALS['SITE_DB']->query_value('calendar_types', 't_title ', array('id' => $this->eventtype_id))));
 }
Esempio n. 20
0
 function setUp()
 {
     parent::setUp();
     require_code('authors');
     add_author($author = 'author1', $url = 'www.google.com', $forum_handle = 3, $description = 'happy', $skills = 'play', $meta_keywords = '', $meta_description = '');
     add_author($author = 'author2', $url = 'www.yahoo.com', $forum_handle = 3, $description = 'welcome', $skills = 'drama', $meta_keywords = '', $meta_description = '');
     // Test the forum was actually created
     $this->assertTrue('author1' == $GLOBALS['FORUM_DB']->query_value('authors', 'author', array('author' => 'author1')));
 }
Esempio n. 21
0
 function setUp()
 {
     parent::setUp();
     require_code('ocf_general_action');
     require_code('ocf_general_action2');
     $this->email_id = ocf_make_welcome_email('test_mail', "test subject", "test content", 1262671781, 0);
     // Test the forum was actually created
     $this->assertTrue('test_mail' == $GLOBALS['SITE_DB']->query_value('f_welcome_emails', 'w_name ', array('id' => $this->email_id)));
 }
Esempio n. 22
0
 function setUp()
 {
     parent::setUp();
     require_code('ocf_general_action');
     require_code('ocf_general_action2');
     $this->template_id = ocf_make_post_template('test_template', 'test', '+1', 1);
     // Test the forum was actually created
     $this->assertTrue('test_template' == $GLOBALS['FORUM_DB']->query_value('f_post_templates', 't_title ', array('id' => $this->template_id)));
 }
Esempio n. 23
0
 function setUp()
 {
     parent::setUp();
     require_code('ocf_moderation_action');
     require_code('ocf_moderation_action2');
     $this->mod_id = ocf_make_multi_moderation('Test Moderation', 'Test', NULL, 0, 0, 0, '*', 'Nothing');
     // Test the forum was actually created
     $this->assertTrue('Test Moderation' == get_translated_text($GLOBALS['FORUM_DB']->query_value('f_multi_moderations', 'mm_name ', array('id' => $this->mod_id))));
 }
Esempio n. 24
0
 function setUp()
 {
     parent::setUp();
     require_code('chat');
     require_code('chat2');
     $this->chatroom_id = add_chatroom('test_message', 'test_chat_room', 4, '', '2,3,4,5,6,7,8,9,10', '', '', 'EN', 0);
     // Test the forum was actually created
     $this->assertTrue('test_chat_room' == $GLOBALS['SITE_DB']->query_value('chat_rooms', 'room_name ', array('id' => $this->chatroom_id)));
 }
Esempio n. 25
0
 function setUp()
 {
     parent::setUp();
     require_code('ocf_general_action');
     require_code('ocf_general_action2');
     ocf_make_emoticon($code = 'X:)', $theme_img_code = 'image/em.jpg', $relevance_level = 1, $use_topics = 1, $is_special = 0);
     // Test the forum was actually created
     $this->assertTrue('X:)' == $GLOBALS['FORUM_DB']->query_value('f_emoticons', 'e_code ', array('e_code' => 'X:)')));
 }
Esempio n. 26
0
 function setUp()
 {
     parent::setUp();
     require_code('tickets2');
     add_ticket_type("platinum", 0, 0);
     // Test the forum was actually created
     $this->tickettype_id = $GLOBALS['SITE_DB']->query_value_null_ok('translate', 'id', array('text_original' => "platinum"));
     $this->assertTrue('platinum' == get_translated_text($this->tickettype_id));
 }
Esempio n. 27
0
 function setUp()
 {
     parent::setUp();
     require_code('ocf_members_action');
     require_code('ocf_members_action2');
     require_lang('ocf');
     $this->user_id = ocf_make_member('testuser', '123456', '*****@*****.**', array(), 10, 1, 1980, array(), NULL, NULL, 1, NULL, NULL, '', NULL, '', 0, 0, 1, '', '', '', 1, 1, NULL, 1, 1, '', NULL, '', true, NULL, '', 1, NULL, NULL, 0, '*', '');
     // Test the forum was actually created
     $this->assertTrue('testuser' == $GLOBALS['FORUM_DB']->query_value('f_members', 'm_username', array('id' => $this->user_id)));
 }
Esempio n. 28
0
 function setUp()
 {
     parent::setUp();
     require_code('ocf_forums_action');
     require_code('ocf_forums_action2');
     require_lang('ocf');
     $this->forum_cat_id = ocf_make_category('Test_cat', 'nothing', 1);
     // Test the forum was actually created
     $this->assertTrue('Test_cat' == $GLOBALS['FORUM_DB']->query_value('f_categories', 'c_title', array('id' => $this->forum_cat_id)));
 }
Esempio n. 29
0
 function setUp()
 {
     parent::setUp();
     require_code('ocf_members_action');
     require_code('ocf_members_action2');
     require_lang('ocf');
     ocf_ban_member(3);
     // Test the forum was actually created
     $this->assertTrue(1 == $GLOBALS['FORUM_DB']->query_value('f_members', 'm_is_perm_banned', array('id' => 3)));
 }
Esempio n. 30
0
 function setUp()
 {
     parent::setUp();
     require_code('ocf_moderation');
     require_code('ocf_moderation_action');
     require_code('ocf_moderation_action2');
     $this->establish_admin_session();
     $this->warn_id = ocf_make_warning(1, 'nothing', NULL, NULL, 1, NULL, NULL, 0, '', 0, 0, NULL);
     // Test the forum was actually created
     $this->assertTrue('nothing' == $GLOBALS['FORUM_DB']->query_value('f_warnings', 'w_explanation ', array('id' => $this->warn_id)));
 }