Commit 3b1efa0a65f34dcc77a121a6f413262700011320

Authored by Benjamin Renard
2 parents 14ae289b e2644543

Merge branch 'master' into expression-parser-bre

help/parameters/tilt_dipole.pdf 0 → 100644
No preview for this file type
php/WebServices/Tests/Base/TestsSuite.php
... ... @@ -55,7 +55,7 @@ class TestsSuite {
55 55 );
56 56 if (!$descriptionsOnly) {
57 57 $runFunc = "run".$ws_type;
58   - $res["status"] = $test->$runFunc(BASE_URL);
  58 + $res["status"] = $test->$runFunc(webAlias);
59 59 }
60 60 $results[] = $res;
61 61 }
... ...
php/WebServices/Tests/Suite/TestGetObsDataTree_40.php
... ... @@ -31,7 +31,7 @@ class TestGetObsDataTree_40 extends TestAbstract
31 31 );
32 32 }
33 33 $nodes = $doc->getElementsByTagName('LocalDataBaseParameters');
34   - if ($nodes->count() == 0) {
  34 + if ($nodes->length == 0) {
35 35 return array(
36 36 'success' => FALSE,
37 37 'message' => 'Cannot retrieve LocalDataBaseParameters node',
... ...
php/classes/AmdaAction.php
... ... @@ -250,17 +250,24 @@ class AmdaAction
250 250 $info = $child->getAttribute('desc');
251 251  
252 252 if ($child->hasAttribute('dataStart') && $child->hasAttribute('dataStop')) {
253   - $info .= "<br/>Time Range: ".$child->getAttribute('dataStart')."-".$child->getAttribute('dataStop');
254   -
  253 + $dataStart = $child->getAttribute('dataStart');
  254 + // check UTC format
  255 + if ( !preg_match('/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z/', $dataStart ) ) {
  256 + if ( $dataStart == "MissionDependent" )
  257 + $info .= "<br/>Time Range : depending on mission selection";
  258 + else
  259 + $info .= "<br/>Time Range : undefined";
  260 + $child->setAttribute('dataStart', date("Y-m-d\TH:i:s\Z", strtotime(' -1 day')));
  261 + $child->setAttribute('dataStop', date("Y-m-d\TH:i:s\Z", time()));
  262 + } else {
  263 + $info .= "<br/>Time Range: ".$child->getAttribute('dataStart')."-".$child->getAttribute('dataStop');
  264 + }
  265 +
255 266 if ($child->hasAttribute('lastUpdate')) {
256 267 $info .= "<br/>Last Updated: : ".$child->getAttribute('lastUpdate');
257 268 }
258 269 }
259   -
260   - if ($child->getAttribute('dataStart') == 'depending on mission') {
261   - $info .= "<br/>Time Range: ".$child->getAttribute('dataStart');
262   - }
263   -
  270 +
264 271 // if ($child->getAttribute('restriction') > 1) {
265 272 // $restricted = $child->getAttribute('restriction');
266 273 // $info .= "<br/><b>Time Restriction</b>: -$restricted days";
... ... @@ -279,7 +286,9 @@ class AmdaAction
279 286  
280 287 if ($child->tagName == 'parameter') {
281 288 $isParameter = true;
282   -
  289 + if ($child->hasAttribute('TemplatedParameter'))
  290 + $needsArgs = true;
  291 +
283 292 if ($child->parentNode->hasAttribute('dataStart')) {
284 293 $globalStart = $child->parentNode->getAttribute('dataStart');
285 294 $globalStop = $child->parentNode->getAttribute('dataStop');
... ...
php/wsTests.php
... ... @@ -7,8 +7,6 @@ set_include_path(get_include_path() . PATH_SEPARATOR . &quot;WebServices/Tests/&quot;);
7 7  
8 8 require_once("Base/TestsSuite.php");
9 9  
10   -define("BASE_URL","http://127.0.0.1");
11   -
12 10 $suite = new TestsSuite();
13 11 $suite->init('WebServices/Tests/Suite');
14 12 $results = $suite->run();
... ... @@ -16,7 +14,7 @@ $results = $suite-&gt;run();
16 14 $error = FALSE;
17 15 foreach ($results as $result) {
18 16 if (!$result['status']['success']) {
19   - echo "[ERROR] ".$result['name']." - ".$result['status']['message'].PHP_EOL;
  17 + echo "[ERROR] ".$result['name']." - ".$result['type']." - ".$result['status']['message'].PHP_EOL;
20 18 $error = TRUE;
21 19 }
22 20 }
... ...