Browse Source

Updated tests and fixed small issue introduced while migrating Zend_Service_LiveDocx to trunk

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19362 44c647ce-9c0f-0410-b52a-842ac1e357ba
jonathan_maron 16 years ago
parent
commit
2b05731399

+ 3 - 3
demos/Zend/Service/LiveDocx/README

@@ -1,6 +1,6 @@
 Zend_Service_LiveDocx Demonstration Applications
 ------------------------------------------------
 
-Before these demonstration applications can be used, you must set the path to your locally installed Zend Framework and Zend Framework Standard Incubator in lines 7 and 8 of "common.php".
-
-Everything else will be set up automatically.
+Before these demonstration applications can be used, you may need set the path
+to your locally installed Zend Framework Standard Trunk in lines 7 and 8 of
+"common.php". By default, this is set up automatically.

+ 2 - 3
demos/Zend/Service/LiveDocx/common.php

@@ -1,11 +1,10 @@
 <?php
 
 // Turn up error reporting
-error_reporting (E_ALL|E_STRICT);
+error_reporting(E_ALL | E_STRICT);
 
 // Set path to libraries
-set_include_path ('/usr/share/php-libs/zf/ZendFramework-1.9.5/library' . PATH_SEPARATOR .
-                  '/usr/share/ZendFramework-Incubator/library'         . PATH_SEPARATOR);
+set_include_path(realpath(dirname(__FILE__) . '/../../../../library'));
 
 // Demos_Zend_Service_LiveDocx_Helper
 require_once dirname(__FILE__) . '/Helper.php';

+ 2 - 2
library/Zend/Service/LiveDocx.php

@@ -231,12 +231,12 @@ class Zend_Service_LiveDocx
                 );
             }
             
-            if (null === ($client = $this->getSoapClient())) {
+            if (null === $this->getSoapClient()) {
                 $this->_initSoapClient($this->_endpoint);
             }            
             
             try {
-                $client->LogIn(array(
+                $this->getSoapClient()->LogIn(array(
                     'username' => $this->getUsername(),
                     'password' => $this->getPassword(),
                 ));

+ 12 - 1
tests/TestConfiguration.php.dist

@@ -616,6 +616,17 @@ define('TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PUBLIC_KEY', 'public mailhide key'
 define('TESTS_ZEND_SERVICE_RECAPTCHA_MAILHIDE_PRIVATE_KEY', 'private mailhide key');
 
 /**
+ * Zend_Service_LiveDocx configuration
+ *
+ * Define username and password in order to run unit tests for LiveDocX web 
+ * services.
+ *
+ * phpunit/phpunit will typically work.
+ */
+define('TESTS_ZEND_SERVICE_LIVEDOCX_USERNAME', false);
+define('TESTS_ZEND_SERVICE_LIVEDOCX_PASSWORD', false);
+
+/**
  * Zend_Soap_AutoDiscover scenario tests for complex objects and wsdl generation
  *
  * Copy all the files of zf/tests/Zend/Soap/_files/fulltests into a directory
@@ -651,4 +662,4 @@ define('TESTS_ZEND_VALIDATE_ONLINE_ENABLED', false);
  * PHPUnit Code Coverage / Test Report
  */
 define('TESTS_GENERATE_REPORT', false);
-define('TESTS_GENERATE_REPORT_TARGET', '/path/to/target');
+define('TESTS_GENERATE_REPORT_TARGET', '/path/to/target');