function setUp()
	{
		parent :: setUp();
		
		$this->search_query = new search_query();
		$this->search = new full_text_search();
	} 
  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);
  }
 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();
 }
  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(),
    );
  }
 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);
 }
 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);
 }
 function setUp()
 {
     parent::setUp();
     $this->ac =& access_policy::instance();
 }