Drupal Testing: PHP: 03: Eclipse PHP Project Creation/Setup

Note: Run composer.phar install often. In PHPUnit newly added classes weren't visible in the classpath until the install was run.

Starting off with XAMPP installed - assuming localhost:80 is working on XAMPP

File Structure

/composer.json

/composer.lock

/composer.phar

/src/<php source code/classes>

/tests/<phpunit tests>

/vendors

 

Create New PHP Project in Eclipse

PHP Source Folders

 

Enable project specific settings so PHP7 executable may be specified

Setting Project Properties to use PHP7 executable

Need to install Zend Debugger extension

Now the executable will show up under Installed PHPs

 

PHPUnit Tests can be run from the Class or Test Level

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Tags