Configuring PHPUnit

The following procedures explain how to bootstrap and configure PHPUnit.

 

 

Instructions on how to complete a procedure

To bootstrap and configure PHPUnit:

  1. Create a phpunit.xml file in your tests directory.
  2. Add the 'bootstrap="/path/to/bootstrap.php"' as the attribute of <phpunit>:

<phpunit bootstrap=./bootstrap.php">

</phpunit>

Note:

The attributes of the <phpunit> element can be used to configure PHPUnit's core functionality. For more information, see http://www.phpunit.de/manual/current/en/appendixes.configuration.html#appendixes.configuration.testsuites

  1. In the PHP Explorer, right-click the newly created phpunit.xml file, and select Run As | PHPUnit.

You can now run your PHPUnit tests.

 

 

Related Links

Related Links:

Using PHPUnit Testing

Creating a PHPUnit Test Case