当前位置: 首页>>代码示例>>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;未经允许,请勿转载。