Posts

Showing posts with the label phpunit

PHPUnit Taking Forever to Run

I was tasked to create some PHPUnit tests for a project at work, but I was having an issue running the tests because they were taking forever to load, even if it was just a single small little test that just asserted a true statement. So, I went googling for some kind of result and found this mail archive discussed in the ZendFramework mail archive. Basically, you just want to check your phpunit.xml file and ensure you only whitelist the files and directories you want to be tested. Don't include excludes unless they are included in your whitelist. To put example to words, let's assume you have a phpunit.xml similar to this: <phpunit bootstrap="./tests/bootstrap.php"          backupGlobals="false"          backupStaticAttributes="false"          syntaxCheck="false"          colors="false">     <testsuites>         <testsuite name="MyTest-Application">             <directory suffix=".php"...