Note that there are some explanatory texts on larger screens.

plurals
  1. POConfiguring File Names for PHPUnit
    primarykey
    data
    text
    <p>I am a new user of PHPUnit, and I am converting our existing tests (asserts) into the PHPUnit framework to provide a better test environment and code coverage. However, I need to know how to try to get PHPUnit working with our testing code structure. </p> <p>Our project directories are similar to the following: <br /> Application1/ <br /> &nbsp;&nbsp;&nbsp;CREDIT_CARD.class - Class naming convention for CREDIT_CARD <br /> &nbsp;&nbsp;&nbsp;CREDIT_CARD.class.test - Automated Tests for CREDIT_CARD.class <br /> &nbsp;&nbsp;&nbsp;File.php - Application File <br /> &nbsp;&nbsp;&nbsp;File.php.test - Automated tests for File.php <br /> &nbsp;&nbsp;&nbsp;File2.php <br /> &nbsp;&nbsp;&nbsp;File2.php.test - Automated tests for File2.php <br /> <br />Application2/ <br /> &nbsp;&nbsp;&nbsp;ANOTHER_CLASS.class <br /> &nbsp;&nbsp;&nbsp;ANOTHER_CLASS.class.test <br /> &nbsp;&nbsp;&nbsp;DifferentFile.php - Application File <br /> &nbsp;&nbsp;&nbsp;DifferentFile.php.test - Automated tests for File.php <br /> <br />lib/ <br /> &nbsp;&nbsp;&nbsp;UTIL/ <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SHARED_CLASS.class <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SHARED_CLASS.class.test <br /> &nbsp;&nbsp;&nbsp;VISUAL/ <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VISUAL_TOOL.class <br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VISUAL_TOOL.class.test <br /> <br /> I need to know how to configure the PHPUnit tests so I can run the tests in lib/UTIL/<em>.test (which load the class file using the setUp() method) then the lib/VC/</em>.test, followed (if successful) by the Application1 and Application2 tests. I saw mention of a PHPUnit_xml file and a bootstrap file, but I can not find a reference template to see if these are what I need. Any help would be appreciated. </p> <p>I know the documentation refers to a test.php addition to the file names, but I am hoping to not have to change our structure and naming conventions as I would like to be able to run a mix of the files until they are all converted over to the PHPUnit framework. Changing names will cause a procedure change in our company and training for the developers, which I am trying to avoid. </p> <p>Thanks in advance for any assistance.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload