Browse Source

Updated MIN_ZF_VERSION in Zend_Service_LiveDocx check-environment.php script

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@20594 44c647ce-9c0f-0410-b52a-842ac1e357ba
jonathan_maron 16 years ago
parent
commit
361d24f045
1 changed files with 9 additions and 8 deletions
  1. 9 8
      demos/Zend/Service/LiveDocx/check-environment.php

+ 9 - 8
demos/Zend/Service/LiveDocx/check-environment.php

@@ -3,10 +3,10 @@
 include_once './common.php';
 
 define('TEST_PASS',       'PASS');
-define('TEST_FAIL',       'FAIL');  
+define('TEST_FAIL',       'FAIL');
 
 define('MIN_PHP_VERSION', '5.2.4');
-define('MIN_ZF_VERSION',  '1.8.0');
+define('MIN_ZF_VERSION',  '1.10.0beta');
 
 define('SOCKET_TIMEOUT',   5); // seconds
 
@@ -98,7 +98,7 @@ $counter ++;
 
 // -----------------------------------------------------------------------------
 
-if (1 === version_compare(Zend_Version::VERSION, MIN_ZF_VERSION)) {
+if (1 === Zend_Version::compareVersion(PHP_VERSION, MIN_PHP_VERSION)) {
     $result = TEST_PASS;
 } else {
     $result = TEST_FAIL;
@@ -226,10 +226,11 @@ try {
             'password' => DEMOS_ZEND_SERVICE_LIVEDOCX_PASSWORD
         )
     );
+    $phpLiveDocx->logIn();
     $duration = microtime(true) - $microtime;
 } catch (Zend_Service_LiveDocx_Exception $e) {
     $duration = -1;
-    $errorMessage = $e->getMessage();    
+    $errorMessage = $e->getMessage();
 }
 
 if (is_null($errorMessage)) {
@@ -239,7 +240,7 @@ if (is_null($errorMessage)) {
     $failed = true;
 }
 
-printLine($counter, sprintf('Instantiating Zend_Service_LiveDocx_MailMerge object (%01.2fs)', $duration), $result);
+printLine($counter, sprintf('Logging into backend service (%01.2fs)', $duration), $result);
 
 $counter ++;
 
@@ -265,13 +266,13 @@ print(Demos_Zend_Service_LiveDocx_Helper::wrapLine(PHP_EOL . $message . PHP_EOL
 function printLine($counter, $testString, $testResult)
 {
     $lineLength = Demos_Zend_Service_LiveDocx_Helper::LINE_LENGTH;
-    
+
     //                        counter     result
     $padding = $lineLength - (4 + strlen(TEST_PASS));
-    
+
     $counter    = sprintf('%2s: ', $counter);
     $testString = str_pad($testString, $padding, '.', STR_PAD_RIGHT);
-    
+
     printf('%s%s%s%s', $counter, $testString, $testResult, PHP_EOL);
 }