예제 #1
0
 public function setup()
 {
     parent::setup();
     drupal_install_modules(array('search', 'kasahorow', 'kentry', 'devel'));
     $this->path = drupal_get_path('module', 'kentry');
     //Create a node and add some relations
     $this->relid = 'testrel';
     $this->node1 = new stdClass();
     $this->node2 = new stdClass();
     $this->node3 = new stdClass();
     $this->node4 = new stdClass();
     $this->node5 = new stdClass();
     $this->node1->title = 'Test node 1';
     node_save($this->node1);
     $this->node2->title = 'Test node 2';
     node_save($this->node2);
     $this->node3->title = 'Test node 3';
     node_save($this->node3);
     $this->node4->title = 'Test node 4';
     node_save($this->node4);
     $this->node5->title = 'Test node 5';
     node_save($this->node5);
     //Outgoing link from node1 to node2: ancestor(node1) = node2
     _kentry_add_link($this->node1, $this->node2, $this->relid);
     //Incoming link from node3 to node1: descendant(node1) = node3
     _kentry_add_link($this->node3, $this->node1, $this->relid);
     // ancestor(node2) = node4
     _kentry_add_link($this->node2, $this->node4, $this->relid);
     // descendant(node3) = node5
     _kentry_add_link($this->node5, $this->node3, $this->relid);
 }
예제 #2
0
 function setup()
 {
     parent::setup();
     drupal_install_modules(array('kasahorow', 'kservices', 'devel'));
 }
예제 #3
0
 public function setup()
 {
     parent::setup();
     drupal_install_modules(array('swen', 'devel'));
 }