Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
//
3
//  $Id: getLevel.php,v 1.2 2004/12/21 17:06:02 dufuz Exp $
4
//
5
 
6
require_once 'UnitTest.php';
7
 
8
class tests_getLevel extends UnitTest
9
{
10
    // check if we get the right ID, for the given path
11
    function test_MemoryDBnested()
12
    {
13
        $tree = $this->getMemoryDBnested();
14
        $id = $tree->getIdByPath('/Root/child 2/child 2_2');
15
        $this->assertEquals(2, $tree->getLevel($id));
16
    }
17
 
18
    function test_MemoryMDBnested()
19
    {
20
        $tree = $this->getMemoryMDBnested();
21
        $id = $tree->getIdByPath('/Root/child 2/child 2_2');
22
        $this->assertEquals(2, $tree->getLevel($id));
23
    }
24
 
25
    // do this for XML
26
 
27
    // do this for Filesystem
28
 
29
    // do this for DBsimple
30
 
31
    // do this for DynamicDBnested
32
    function test_DynamicDBnested()
33
    {
34
        $tree =& $this->getDynamicDBnested();
35
//        $id = $tree->getIdByPath('/Root/child 2/child 2_2');
36
        $id = 5;
37
        $this->assertEquals(2, $tree->getLevel($id));
38
    }
39
 
40
    function test_DynamicMDBnested()
41
    {
42
        $tree =& $this->getDynamicMDBnested();
43
//        $id = $tree->getIdByPath('/Root/child 2/child 2_2');
44
        $id = 5;
45
        $this->assertEquals(2, $tree->getLevel($id));
46
    }
47
}
48
 
49
?>