當前位置: 首頁>>代碼示例>>PHP>>正文


PHP db_test::setUp方法代碼示例

本文整理匯總了PHP中db_test::setUp方法的典型用法代碼示例。如果您正苦於以下問題:PHP db_test::setUp方法的具體用法?PHP db_test::setUp怎麽用?PHP db_test::setUp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在db_test的用法示例。


在下文中一共展示了db_test::setUp方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setUp

	function setUp()
	{
		parent :: setUp();
		
		$this->search_query = new search_query();
		$this->search = new full_text_search();
	} 
開發者ID:BackupTheBerlios,項目名稱:limb-svn,代碼行數:7,代碼來源:search_full_text_find_test.class.php

示例2: setUp

  function setUp()
  {
  	parent :: setUp();
  	
  	$this->metadata_component =& new metadata_component_test_version($this);
  	$this->metadata_component->metadata_component();
  	
  	$this->controller =& new Mocksite_object_controller($this);
  	
  	$this->metadata_component->setReturnReference('_get_mapped_controller', $this->controller);
  	
  	$tree =& tree :: instance();
  	
		$values['identifier'] = 'object_300';
		$values['object_id'] = 300;
		$root_node_id = $tree->create_root_node($values, false, true);

		$values['identifier'] = 'object_301';
		$values['object_id'] = 301;
		$this->parent_node_id = $tree->create_sub_node($root_node_id, $values);

		$values['identifier'] = 'object_302';
		$values['object_id'] = 302;
		$this->sub_node_id = $tree->create_sub_node($this->parent_node_id, $values);

		$values['identifier'] = 'object_303';
		$values['object_id'] = 303;
		$this->sub_node_id2 = $tree->create_sub_node($root_node_id, $values);
  }
開發者ID:BackupTheBerlios,項目名稱:limb-svn,代碼行數:29,代碼來源:metadata_component_test.class.php

示例3: setUp

 function setUp()
 {
     $this->image =& db_table_factory::instance('test_image');
     $this->image_variation =& db_table_factory::instance('test_image_variation');
     $this->media =& db_table_factory::instance('test_media');
     parent::setUp();
 }
開發者ID:BackupTheBerlios,項目名稱:limb-svn,代碼行數:7,代碼來源:db_table_cascade_delete_test.class.php

示例4: setUp

  function setUp()
  {
    parent :: setUp();

    $this->ac = new access_policy_test_version($this);

    $this->objects_to_assign_actions = array(
      1 => array(
        'id' => 300,
        'controller_id' => 10,
        'controller_name' => 'site_object_access_test',
      ),
      2 => array(
        'id' => 302,
        'controller_id' => 10,
        'controller_name' => 'site_object_access_test',
      ),
      3 => array(
        'id' => 303,
        'controller_id' => 10,
        'controller_name' => 'site_object_access_test',
      )
    );

    $this->objects_to_filter = array(300, 300, 301, 302, 303);

    $this->site_object_controller_actions = array(
        'display' => array(),
        'create' => array(),
        'edit' => array(),
        'publish' => array(),
        'delete' => array(),
    );
  }
開發者ID:BackupTheBerlios,項目名稱:limb-svn,代碼行數:34,代碼來源:access_policy_test.class.php

示例5: setUp

 function setUp()
 {
     parent::setUp();
     $this->ac =& access_policy::instance();
     $this->object =& new Mocksite_object($this);
     $this->parent_object =& new Mocksite_object($this);
     $this->parent_object_controller =& new Mocksite_object_controller($this);
     $this->object->expectOnce('get_id');
     $this->parent_object->expectOnce('get_id');
     $this->parent_object->expectOnce('get_controller_id');
     $this->parent_object->expectOnce('get_controller');
     $this->parent_object->setReturnReference('get_controller', $this->parent_object_controller);
 }
開發者ID:BackupTheBerlios,項目名稱:limb-svn,代碼行數:13,代碼來源:save_object_access_policy_test.class.php

示例6: setUp

 function setUp()
 {
     parent::setUp();
     $this->fetcher =& new fetcher();
     $this->fetcher->set_jip_status(true);
     $user_id = 10;
     $this->_login_user($user_id, array(103 => 'visitors', 104 => 'admin'));
     $obj1 = site_object_factory::create('fetching_object1_test_version');
     $obj2 = site_object_factory::create('fetching_object2_test_version');
     $obj1->set_identifier('root');
     $obj1->set_title('Root');
     $obj1->create(true);
     $access[$obj1->get_id()] = array($user_id => array('r' => 1, 'w' => 1));
     $this->root_node_id = $obj1->get_node_id();
     $this->_add_object($obj1);
     $obj1->set_parent_node_id($this->root_node_id);
     $obj1->set_identifier('articles');
     $obj1->set_title('Articles');
     $obj1->create();
     $access[$obj1->get_id()] = array($user_id => array('r' => 1, 'w' => 1));
     $this->_add_object($obj1);
     $this->articles_object = $obj1;
     $obj2->set_parent_node_id($obj1->get_node_id());
     $obj2->set_identifier('article1');
     $obj2->set_title('Article1');
     $obj2->create();
     $access[$obj2->get_id()] = array($user_id => array('r' => 1, 'w' => 1));
     $this->child_node_ids[] = $obj2->get_node_id();
     $this->_add_object($obj2);
     $this->article_object = $obj2;
     $obj2->set_parent_node_id($obj1->get_node_id());
     $obj2->set_identifier('article2');
     $obj2->set_title('Article2');
     $obj2->create();
     $access[$obj2->get_id()] = array($user_id => array('r' => 1, 'w' => 1));
     $this->child_node_ids[] = $obj2->get_node_id();
     $this->_add_object($obj2);
     $obj2->set_parent_node_id($obj1->get_node_id());
     $obj2->set_identifier('article3');
     $obj2->set_title('Article3');
     $obj2->create();
     $access[$obj2->get_id()] = array($user_id => array('r' => 0, 'w' => 0));
     $this->child_node_ids[] = $obj2->get_node_id();
     $this->_add_object($obj2);
     $this->access_policy =& access_policy::instance();
     $this->access_policy->save_user_object_access($access);
     $actions = array($user_id => array('display' => 1));
     $this->access_policy->save_user_action_access($obj1->get_class_id(), $actions);
     $this->access_policy->save_user_action_access($obj2->get_class_id(), $actions);
 }
開發者ID:BackupTheBerlios,項目名稱:limb-svn,代碼行數:50,代碼來源:fetching_test.class.php

示例7: setUp

 function setUp()
 {
     parent::setUp();
     $this->ac =& access_policy::instance();
 }
開發者ID:BackupTheBerlios,項目名稱:limb-svn,代碼行數:5,代碼來源:load_access_policy_test.class.php


注:本文中的db_test::setUp方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。