/[volute]/trunk/projects/grid/vospace/php_endpoint/tests/test_service.php
ViewVC logotype

Annotation of /trunk/projects/grid/vospace/php_endpoint/tests/test_service.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 106 - (hide annotations)
Thu Mar 27 06:46:37 2008 UTC (12 years, 10 months ago) by richard.p.wagner
File size: 1332 byte(s)
creating grid project, and starting vospace project
1 richard.p.wagner 106 <?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('../vospace_service.php');
9    
10     class TestVOSpaceService extends UnitTestCase {
11     function TestVOSpaceService() {
12     $this->UnitTestCase();
13     $this->vospace_server = new SoapServer('../vospace.wsdl',
14     array('uri' => 'http://www.ivoa.net/xml/VOSpaceContract-v1.1rc1'));
15     $this->vospace_server->SetClass("VOSpaceService");
16    
17     $this->service = new VOSpaceService();
18    
19     }
20    
21     function testNewServer() {
22     $this->assertNotNull($this->vospace_server);
23     }
24    
25     function testFunctionsList() {
26    
27     $function_list = $this->vospace_server->getFunctions();
28    
29     $this->assertNotNull($function_list);
30     $this->assertTrue(in_array("ListNodes", $function_list));
31     $this->assertEqual(count($function_list), 15);
32     }
33    
34     function testProperties() {
35    
36     $prop_list = $this->service->GetProperties();
37    
38     $this->assertNotNull($prop_list);
39    
40     $mime_type = $prop_list["provides"]["mime_type"];
41    
42     // properties are of a class Property
43     $this->assertNotNull($mime_type);
44     $this->assertEqual($mime_type->uri, "ivo://ivoa.net/vospace/core#mimetype");
45     $this->assertEqual($mime_type->readOnly, TRUE);
46     }
47    
48     }
49    
50    
51     $test = &new TestVOSpaceService();
52     $test->run(new HtmlReporter());
53    
54     ?>

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26