Interesting. It seems like that should be the right track for me as well,
but I'm not sure exactly how to change my xml to include only the most
necessary things: here's the current state:
<filter>
        <whitelist>
            <directory suffix=".php">../application/</directory>
            <exclude>
                <directory suffix=".phtml">../application/</directory>
                <file>../application/Bootstrap.php</file>
                <file>../application/controllers/ErrorController.php</file>
            </exclude>
        </whitelist>
    </filter>

That shouldn't be getting any svn files in it, should it?

On Tue, May 25, 2010 at 6:43 PM, Fudgz <[email protected]>wrote:

>
> Ok I finally found out why this was taking a lot of time.
>
> The problems seem to be inside the PHPUnit engine; my phpunit.xml file
> looked like this :
>
> <filter>
>    <whitelist>
>      <directory suffix=".php">../application</directory>
>      <directory suffix=".php">../library</directory>
>      <exclude>
>        <directory suffix=".php">../library/Zend</directory>
>        <directory suffix=".php">../library/Doctrine</directory>
>        <directory suffix=".phtml">../application</directory>
>        <file>../application/Bootstrap.php</file>
>        <file>../application/scripts/doctrine.php</file>
>      </exclude>
>    </whitelist>
>  </filter>
>
> When you specify a path to the whitelist / blacklist, PHPunit WILL "parse"
> everything in it, recursivly, but will not include them in the final result
> if they have been "excluded" (or blacklisted).
> This also includes every .svn folders and content (which was also my case)
> So with this xml bit, every single bit of my libs (including doctrine and
> zend) would have been parsed by phpunit.
> By changing this xml bit into the following one, my tests now run in 3
> seconds (instead of ~50)
>
> <filter>
>    <whitelist>
>      <directory suffix=".php">../application</directory>
>      <directory suffix=".php">../library/lib1_to_test</directory>
>      <directory suffix=".php">../library/lib2_to_test</directory>
>      <exclude>
>        <directory suffix=".phtml">../application</directory>
>        <file>../application/Bootstrap.php</file>
>        <file>../application/scripts/doctrine.php</file>
>      </exclude>
>    </whitelist>
>  </filter>
>
> I hope this helped you.
> --
> View this message in context:
> http://zend-framework-community.634137.n4.nabble.com/PHPUnit-taking-forever-tp2133459p2230316.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>



-- 
+420 608 577 012

Prague Playhouse
www.pragueplayhouse.com

Reply via email to