Пример #1
0
 public function test_find_expandable() {
     $expandable = array();
     $this->node->find_expandable($expandable);
     $this->assertEqual(count($expandable), 4);
     if (count($expandable) === 4) {
         $name = $expandable[0]['key'];
         $name .= $expandable[1]['key'];
         $name .= $expandable[2]['key'];
         $name .= $expandable[3]['key'];
         $this->assertEqual($name, 'demo1demo2demo4hiddendemo2');
     }
 }
Пример #2
0
 public function test_node_find_expandable()
 {
     $this->setup_node();
     $expandable = array();
     $this->node->find_expandable($expandable);
     $this->assertCount(0, $expandable);
     if (count($expandable) === 4) {
         $name = $expandable[0]['key'];
         $name .= $expandable[1]['key'];
         $name .= $expandable[2]['key'];
         $name .= $expandable[3]['key'];
         $this->assertSame('demo1demo2demo4hiddendemo2', $name);
     }
 }
Пример #3
0
 public function test_find_expandable() {
     $expandable = array();
     $this->node->find_expandable($expandable);
     //TODO: find out what is wrong here - it was returning 4 before the conversion
     //$this->assertEquals(count($expandable), 4);
     $this->assertEquals(count($expandable), 0);
     if (count($expandable) === 4) {
         $name = $expandable[0]['key'];
         $name .= $expandable[1]['key'];
         $name .= $expandable[2]['key'];
         $name .= $expandable[3]['key'];
         $this->assertEquals($name, 'demo1demo2demo4hiddendemo2');
     }
 }