function setUp()
  {
  	$this->_clean_up();
  	
  	$this->object = new site_object_manipulation_test();
  	
  	debug_mock :: init($this);
  	
  	$user =& user :: instance();
  	$user->_set_id(10);
  	
  	$tree =& limb_tree :: instance();

		$values['identifier'] = 'root';
		$root_node_id = $tree->create_root_node($values, false, true);

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

		$class_id = $this->object->get_class_id();
		$this->db->sql_insert('sys_site_object', array('id' => 1, 'class_id' => $class_id, 'current_version' => 1));

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

		$class_id = $this->object->get_class_id();
		$this->db->sql_insert('sys_site_object', array('id' => 10, 'class_id' => $class_id, 'current_version' => 1));
  }
 function setUp()
 {
     $this->db =& db_factory::instance();
     $this->_clean_up();
     $this->_init_site_object();
     $this->object->set_attribute('controller_name', 'site_object_controller');
     $controller_id = site_object_controller::get_id('site_object_controller');
     $this->object->set_attribute('controller_id', $controller_id);
     debug_mock::init($this);
     $user =& user::instance();
     $user->_set_id(10);
     $tree =& tree::instance();
     $values['identifier'] = 'root';
     $values['object_id'] = 100;
     $this->root_node_id = $tree->create_root_node($values, false, true);
     $class_id = $this->object->get_class_id();
     $this->db->sql_insert('sys_site_object', array('id' => 100, 'class_id' => $class_id, 'current_version' => 1));
     $values['identifier'] = 'ru';
     $values['object_id'] = 1;
     $this->parent_node_id = $tree->create_sub_node($this->root_node_id, $values);
     $this->db->sql_insert('sys_site_object', array('id' => 1, 'class_id' => $class_id, 'current_version' => 1));
     $values['identifier'] = 'document';
     $values['object_id'] = 10;
     $this->sub_node_id = $tree->create_sub_node($this->parent_node_id, $values);
     $this->db->sql_insert('sys_site_object', array('id' => 10, 'class_id' => $class_id, 'current_version' => 1));
 }
예제 #3
0
 function setUp()
 {
     debug_mock::init($this);
     $this->_load_tables_list();
     $this->_clean_up();
     $this->_load_dumped_db();
 }
 function setUp()
 {
     $this->db = db_factory::instance();
     debug_mock::init($this);
     $this->driver = new materialized_path_driver_test_version();
     $this->_clean_up();
 }
 function setUp()
 {
     $this->db = db_factory::instance();
     debug_mock::init($this);
     $this->driver = new nested_sets_driver_test_version();
     $this->_clean_up();
 }
 function setUp()
 {
     $this->_clean_up();
     parent::setUp();
     debug_mock::init($this);
     $this->object =& new phpbb_user();
 }
 function setUp()
 {
     debug_mock::init($this);
     $this->dataspace =& dataspace_registry::get('test1');
     $this->form_action = new form_action_test_version($this);
     $this->request = new Mockrequest($this);
     $this->response = new Mockresponse($this);
 }
 function setUp()
 {
     $_REQUEST['action'] = 'test_action';
     $this->site_object_controller =& new site_object_controller_test_version1($this);
     $this->site_object_controller->setReturnValue('get_actions_definitions', $this->test_actions_definition);
     $this->site_object_controller->site_object_controller();
     debug_mock::init($this);
 }
  function setUp()
  {
    $this->object = $this->_create_site_object();

    $this->_clean_up();

    debug_mock :: init($this);
  }
 function setUp()
 {
     debug_mock::init($this);
     $this->test_init = new $this->init_class_name();
     $this->_init_object();
     $this->class_id = $this->object->get_class_id();
     $this->test_init->init($this->object);
 }
 function setUp()
 {
     $this->request = new Mockrequest($this);
     $this->response = new Mockresponse($this);
     $this->site_object_controller =& new site_object_controller_test_version1($this);
     $this->site_object_controller->setReturnValue('get_actions_definitions', $this->actions_definition_test);
     $this->site_object_controller->site_object_controller();
     debug_mock::init($this);
 }
  function setUp()
  {
    $this->db = db_factory :: instance();

    debug_mock :: init($this);

    $this->imp = $this->_create_tree_imp();

    $this->_clean_up();
  }
 function setUp()
 {
     $this->_clean_up();
     $this->object = new site_object_auto_identifier_test_version();
     $tree =& limb_tree::instance();
     $values['identifier'] = 'root';
     $values['object_id'] = 1;
     $this->parent_node_id = $tree->create_root_node($values, false, true);
     $class_id = $this->object->get_class_id();
     $this->db->sql_insert('sys_site_object', array('id' => 1, 'class_id' => $class_id, 'current_version' => 1));
     debug_mock::init($this);
 }
 function setUp()
 {
     debug_mock::init($this);
     $dataspace =& dataspace::instance();
     $dataspace->import(array());
     $dataspace =& dataspace::instance('test1');
     $dataspace->import(array());
     unset($_REQUEST['test1']);
     unset($_REQUEST['submitted']);
     unset($_REQUEST['username']);
     unset($_REQUEST['password']);
     unset($_REQUEST['password_confirm']);
 }
 function setUp()
 {
     $this->object =& $this->_create_site_object();
     $this->_clean_up();
     debug_mock::init($this);
     $_SESSION[user::get_session_identifier()]['id'] = 10;
     $tree =& limb_tree::instance();
     $values['identifier'] = 'root';
     $values['object_id'] = 1;
     $this->parent_node_id = $tree->create_root_node($values, false, true);
     $this->db->sql_insert('sys_class', array('id' => 1, 'class_name' => 'mock_root_object'));
     $this->db->sql_insert('sys_site_object', array('id' => 1, 'class_id' => 1, 'current_version' => 1, 'identifier' => 'root'));
 }
 function setUp()
 {
     $this->db =& db_factory::instance();
     $this->_clean_up();
     $this->object = new site_object_auto_identifier_test_version();
     $tree =& tree::instance();
     $values['identifier'] = 'root';
     $values['object_id'] = 1;
     $this->parent_node_id = $tree->create_root_node($values, false, true);
     $class_id = $this->object->get_class_id();
     $controller_id = site_object_controller::get_id('site_object_controller');
     $this->object->set_attribute('controller_id', $controller_id);
     $this->db->sql_insert('sys_site_object', array('id' => 1, 'class_id' => $class_id, 'current_version' => 1, 'controller_id' => $controller_id));
     debug_mock::init($this);
 }
 function setUp()
 {
     debug_mock::init($this);
 }
  function setUp()
  {
    debug_mock :: init($this);

    $this->db->sql_delete('sys_param');
  }
 function setUp()
 {
     debug_mock::init($this);
     $this->_tree = new nested_sets_driver_test_version();
 }
 function setUp()
 {
     parent::setUp();
     debug_mock::init($this);
 }
예제 #21
0
 function setUp()
 {
     debug_mock::init($this);
     $this->_tree = new nested_db_tree_test();
 }
예제 #22
0
 function setUp()
 {
     debug_mock::init($this);
     dir::rm(MEDIA_DIR);
     $this->db->sql_delete('media');
 }