1 |
richard.p.wagner |
734 |
<?php |
2 |
|
|
|
3 |
|
|
include('../config.inc'); |
4 |
|
|
|
5 |
|
|
require_once(SIMPLE_TEST . 'unit_tester.php'); |
6 |
|
|
require_once(SIMPLE_TEST . 'reporter.php'); |
7 |
|
|
|
8 |
|
|
require_once(BACKEND.'vospace.php'); |
9 |
|
|
require_once('debug_funcs.php'); |
10 |
|
|
|
11 |
|
|
class TestVOSpace extends UnitTestCase { |
12 |
|
|
|
13 |
|
|
function setUp() { |
14 |
|
|
$this->vospace = new VOSpace(); |
15 |
|
|
} |
16 |
|
|
|
17 |
|
|
function testListNodes() { |
18 |
|
|
$this->assertNotNull($this->vospace); |
19 |
|
|
$node = array('uri' => 'ivo://example.org!vospace'); |
20 |
|
|
$node_request = array('nodes' => |
21 |
|
|
array($node)); |
22 |
|
|
$node_list = $this->vospace->listNodes($node_request); |
23 |
|
|
$this->assertEqual(count($node_list['nodes']), 4); |
24 |
|
|
// barf_var($node_list); |
25 |
|
|
} |
26 |
|
|
} |
27 |
|
|
|
28 |
|
|
|
29 |
|
|
$test = &new TestVOSpace(); |
30 |
|
|
$test->run(new HtmlReporter()); |
31 |
|
|
|
32 |
|
|
?> |