Unit Tests

Instructions | API Docs | Apache Setup | PHP Setup | Unit Tests


The included unit tests are based on PHPUnit2 and Phing. PHPUnit2 provides the testing framework while Phing is an ANT based build system. The current version of PHPUnit2 as this is written is 2.3.5. The current version of Phing is 2.1.1. PHP 5.1.2 is also required.

Installation

You can install PHPUnit2 using the PHP Extension and Application Repository (PEAR) installer. On the command-line in your PHP5 home directory, simply type:

pear install PHPUnit2

Due to the changing nature of the Phing documentation as this is written, please refer to http://phing.info/trac/ for the latest installation instructions..

This document will assume C:\dev\php5 as your PHP base directory.

Build, Configure, and Deploy

Configure

Edit DOC_ROOT/php-soap/test/SforcePartnerClientTest.php and modify the following to match your account:

private $username = "username@mail.com";
private $password = "changeme";

A partner.wsdl.xml file is packaged with the toolkit. If for some reason you need a newer version you will need to obtain it from your ADN account. Log into your ADN account and access the setup area. Under 'Integrate' in the left-hand panel you will find the WSDL generator. Select 'Integrate' and then choose the Partner WSDL from the main window. Simply write over the existing partner.wsdl.xml that comes with this toolkit.

Run

  1. Open a CMD prompt.
  2. Navigate to DOC_ROOT/php-soap/test/
  3. Type "phing"
The tests results can be found in DOC_ROOT/php-soap/test/reports/index.html.The log file containing any exception is outputted to DOC_ROOT/php-soap/test/reports/logfile.xml.

Tips / Troubleshooting