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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 106 by richard.p.wagner, Thu Mar 27 06:46:37 2008 UTC revision 731 by richard.p.wagner, Tue Aug 19 05:41:49 2008 UTC
# Line 7  Line 7 
7    
8  require_once('../vospace_service.php');  require_once('../vospace_service.php');
9    
10    require_once('debug_funcs.php');
11    
12    class target_node{
13      public $target;
14      function __construct($tg) {
15        $this->target = $tg;
16      }
17    }
18    
19  class TestVOSpaceService extends UnitTestCase {  class TestVOSpaceService extends UnitTestCase {
20    function TestVOSpaceService() {    function setUp() {
     $this->UnitTestCase();  
21      $this->vospace_server = new SoapServer('../vospace.wsdl',      $this->vospace_server = new SoapServer('../vospace.wsdl',
22                                       array('uri' => 'http://www.ivoa.net/xml/VOSpaceContract-v1.1rc1'));                                       array('uri' => 'http://www.ivoa.net/xml/VOSpaceContract-v1.1rc1'));
23      $this->vospace_server->SetClass("VOSpaceService");      $this->vospace_server->SetClass("VOSpaceService");
# Line 35  Line 43 
43    
44      $prop_list = $this->service->GetProperties();      $prop_list = $this->service->GetProperties();
45    
46        //barf_var($prop_list);
47    
48      $this->assertNotNull($prop_list);      $this->assertNotNull($prop_list);
49    
50      $mime_type = $prop_list["provides"]["mime_type"];      $size = $prop_list["provides"][0];
51    
52      // properties are of a class Property      // properties are of a class Property
53      $this->assertNotNull($mime_type);          $this->assertNotNull($size);
54      $this->assertEqual($mime_type->uri, "ivo://ivoa.net/vospace/core#mimetype");      $this->assertEqual($size["uri"], "ivo://net.ivoa.vospace/properties#size");
55      $this->assertEqual($mime_type->readOnly, TRUE);      $this->assertEqual($size["readOnly"], TRUE);
56    }    }
57    
58      function testGetNode() {
59        
60        $node = $this->service->GetNode(new target_node('ivo://example.org!vospace/128cubed_hierarchy.png'));
61    
62        //barf_var($node);
63    
64        $this->assertNotNull($node["node"]);
65        $this->assertEqual($node["node"]->properties[0]["_"], 569516);
66      }
67    
68    
69  }  }
70    
71    

Legend:
Removed from v.106  
changed lines
  Added in v.731

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