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

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

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

revision 733 by richard.p.wagner, Tue Aug 19 05:41:49 2008 UTC revision 734 by richard.p.wagner, Tue Aug 19 19:37:17 2008 UTC
# Line 116  Line 116 
116    function testPullFromNodeNotFound() {    function testPullFromNodeNotFound() {
117    
118       try {       try {
119         $response = $this->client->PullFromVoSpace(array('source' => 'ivo://example.org!vospace/foo.txt',         $response = $this->client->PullFromVoSpace(array('source' =>
120                                                            'ivo://example.org!vospace/foo.txt',
121                                                          'transfer' => Null));                                                          'transfer' => Null));
122       }       }
123       catch (SoapFault $exp) {       catch (SoapFault $exp) {
124         $this->assertEqual($exp->detail->NodeNotFoundFault->uri, 'ivo://example.org!vospace/foo.txt' );         $this->assertEqual($exp->detail->NodeNotFoundFault->uri, 'ivo://example.org!vospace/foo.txt' );
125       }       }
   
126    }    }
127    
128  //   function testListNodes() {    function testPullFrom() {
129    
130        $view = array('uri' => 'ivo://net.ivoa.vospace/views#identity',
131                      'original'=>True);
132        $protocol = array('uri' => 'ivo://net.ivoa.vospace/protocols#http-client');
133    
134        $request = array('source' =>
135                         'ivo://example.org!vospace/bill_of_rights.txt',
136                         'transfer' => array('view'=> $view,
137                                             'protocol' => $protocol));
138    
139        $response = $this->client->PullFromVoSpace($request);
140        $this->assertNotNull($response->transfer);
141    
142        $endpoint = $response->transfer->protocol->endpoint;
143    
144        // now we're going to check that the endpoint is
145        // really there
146        $this->assertTrue(url_exists($endpoint));
147            
148      }
149    
150      function testListNodesNodeNotFound() {
151        $this->client->ListNodes();
152        $this->assertTrue(0);
153      }
154    
155      function testListNodesRoot() {  
156        $this->client->ListNodes();
157        $this->assertTrue(0);
158      }
159    
160    //   function testListNodesContainer() {
161    //     $this->client->ListNodes();
162    //   }
163    
164    //   function testListNodesSingleNode() {
165  //     $this->client->ListNodes();  //     $this->client->ListNodes();
166  //   }  //   }
167    
168    //   function testListNodesWildcard() {
169    //     $this->client->ListNodes();
170    //   }
171    
172  }  }
173    
174  $test = &new TestVOSpaceServiceEndpoint();  $test = &new TestVOSpaceServiceEndpoint();

Legend:
Removed from v.733  
changed lines
  Added in v.734

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