source: trunk/tests/NodeHeirarchyTest.php @ 1

Last change on this file since 1 was 1, checked in by scdev, 19 years ago

Initial import.

File size: 4.0 KB
Line 
1<?php
2/// FIXME: Tests not implemented.
3return;
4
5/**
6 * PHPUnit test case for NodeHeirarchy
7 *
8 * The method skeletons below need to be filled in with
9 * real data so that the tests will run correctly. Replace
10 * all EXPECTED_VAL and PARAM strings with real data.
11 *
12 * Created with PHPUnit_Skeleton on 2005-08-09
13 */
14require_once 'PHPUnit.php';
15class NodeHeirarchyTest extends PHPUnit_TestCase {
16
17    var $NodeHeirarchy;
18
19    function NodeHeirarchyTest($name)
20    {
21        $this->PHPUnit_TestCase($name);
22    }
23
24    function setUp()
25    {
26        require dirname(__FILE__) . '/_config.inc.php';
27        require_once '../lib/NodeHeirarchy.inc.php';
28        $this->NodeHeirarchy =& new NodeHeirarchy(PARAM);
29    }
30
31    function tearDown()
32    {
33        unset($this->NodeHeirarchy);
34    }
35
36    function test_currentnode()
37    {
38        $result = $this->NodeHeirarchy->currentnode(PARAM);
39        $expected = EXPECTED_VAL;
40        $this->assertEquals($expected, $result);
41    }
42
43    function test_tostringid()
44    {
45        $result = $this->NodeHeirarchy->tostringid(PARAM);
46        $expected = EXPECTED_VAL;
47        $this->assertEquals($expected, $result);
48    }
49
50    function test_toarrayid()
51    {
52        $result = $this->NodeHeirarchy->toarrayid(PARAM);
53        $expected = EXPECTED_VAL;
54        $this->assertEquals($expected, $result);
55    }
56
57    function test_insertnode()
58    {
59        $result = $this->NodeHeirarchy->insertnode(PARAM);
60        $expected = EXPECTED_VAL;
61        $this->assertEquals($expected, $result);
62    }
63
64    function test_deletenode()
65    {
66        $result = $this->NodeHeirarchy->deletenode(PARAM);
67        $expected = EXPECTED_VAL;
68        $this->assertEquals($expected, $result);
69    }
70
71    function test_movenode()
72    {
73        $result = $this->NodeHeirarchy->movenode(PARAM);
74        $expected = EXPECTED_VAL;
75        $this->assertEquals($expected, $result);
76    }
77
78    function test_getparents()
79    {
80        $result = $this->NodeHeirarchy->getparents(PARAM);
81        $expected = EXPECTED_VAL;
82        $this->assertEquals($expected, $result);
83    }
84
85    function test_getnode()
86    {
87        $result = $this->NodeHeirarchy->getnode(PARAM);
88        $expected = EXPECTED_VAL;
89        $this->assertEquals($expected, $result);
90    }
91
92    function test_getchildren()
93    {
94        $result = $this->NodeHeirarchy->getchildren(PARAM);
95        $expected = EXPECTED_VAL;
96        $this->assertEquals($expected, $result);
97    }
98
99    function test_getnumberchildren()
100    {
101        $result = $this->NodeHeirarchy->getnumberchildren(PARAM);
102        $expected = EXPECTED_VAL;
103        $this->assertEquals($expected, $result);
104    }
105
106    function test_isleaf()
107    {
108        $result = $this->NodeHeirarchy->isleaf(PARAM);
109        $expected = EXPECTED_VAL;
110        $this->assertEquals($expected, $result);
111    }
112
113    function test_isancestor()
114    {
115        $result = $this->NodeHeirarchy->isancestor(PARAM);
116        $expected = EXPECTED_VAL;
117        $this->assertEquals($expected, $result);
118    }
119
120    function test_getallancestors()
121    {
122        $result = $this->NodeHeirarchy->getallancestors(PARAM);
123        $expected = EXPECTED_VAL;
124        $this->assertEquals($expected, $result);
125    }
126
127    function test_nodeexists()
128    {
129        $result = $this->NodeHeirarchy->nodeexists(PARAM);
130        $expected = EXPECTED_VAL;
131        $this->assertEquals($expected, $result);
132    }
133
134    function test_getnodelist()
135    {
136        $result = $this->NodeHeirarchy->getnodelist(PARAM);
137        $expected = EXPECTED_VAL;
138        $this->assertEquals($expected, $result);
139    }
140
141    function test_rebuildsubnodeqty()
142    {
143        $result = $this->NodeHeirarchy->rebuildsubnodeqty(PARAM);
144        $expected = EXPECTED_VAL;
145        $this->assertEquals($expected, $result);
146    }
147
148    function test_setsubnodeqtytoparents()
149    {
150        $result = $this->NodeHeirarchy->setsubnodeqtytoparents(PARAM);
151        $expected = EXPECTED_VAL;
152        $this->assertEquals($expected, $result);
153    }
154
155}
156// Running the test.
157$suite = new PHPUnit_TestSuite('NodeHeirarchyTest');
158$result = PHPUnit::run($suite);
159echo $result->toString();
160?>
Note: See TracBrowser for help on using the repository browser.