When Unit Testing Agavi, I use a phing build file that prepares some stuff,
then calls a testrunner through an exec task and finally cleans up some stuff.
Using branch 1.0 this isn't working anymore (I was running 1.0.6, but switched
to 1.0 ot get the fix for #1457). If I however call the testrunner directly,
everything's fine.
Reproduce using the sample app:
{{{
$ cd test
$ php run-test.php
PHPUnit 3.6.4 by Sebastian Bergmann.
...................................................
Time: 4 seconds, Memory: 11.75Mb
OK (51 tests, 122 assertions)
}}}
Using a simple phing build file in the samples dir:
{{{
<?xml version="1.0" encoding="UTF-8" ?>
<project name="test" default="test" basedir=".">
<target name="test">
<exec command="php run-tests.php" dir="${project.basedir}/test"
passthru="true"/>
</target>
</project>
}}}
{{{
$ phing
Buildfile: /var/projects/kvd/oeps/libs/agavi/samples/build.xml
test > test:
PHPUnit 3.6.4 by Sebastian Bergmann.
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
Time: 2 seconds, Memory: 13.00Mb
There were 51 errors:
1) ProductFinderModelTest::testValidProductPricesByName with data set "TPS
Report Cover Sheet" ('TPS Report Cover Sheet', 0.89)
RuntimeException: Buildfile: build.xml does not exist!
/var/projects/kvd/oeps/libs/agavi/src/testing/AgaviTesting.class.php:146
/var/projects/kvd/oeps/libs/agavi/samples/test/run-tests.php:21
2) ProductFinderModelTest::testValidProductPricesByName with data set "Weighted
Companion Cube" ('Weighted Companion Cube', 129.99)
RuntimeException: Buildfile: build.xml does not exist!
/var/projects/kvd/oeps/libs/agavi/src/testing/AgaviTesting.class.php:146
/var/projects/kvd/oeps/libs/agavi/samples/test/run-tests.php:21
//50 other errors snipped
FAILURES!
Tests: 51, Assertions: 0, Errors: 51.
BUILD FINISHED
Total time: 2.5239 seconds
}}}
I don't know why calling this through phing should make a difference, but it
does.
Because this error happende on our dev-server and not on my laptop, I have
determined that it worked fine with phpunit 3.6.2, but upgrading to 3.6.4
causes the problems.
Other than that, the dev-server and my laptop both run Ubuntu 10.4, php 5.3.2,
phing 2.4.8, xdebug 2.0.5.
Anyone got an idea what's going on here?
Best,
Koen
_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users