Ben PHPUnit ile PHP için Maven kullanmak istiyorum ama "mvn test" Ben bu hatayı alıyorum benim testleri çalıştırdığınızda: http://pastie.org/948377
-------------------------------------------------------
T E S T S
-------------------------------------------------------
[DEBUG] --- Start compiling source folder: C:\unifiedpost\dev\testt\src\test\php
[DEBUG] percentage: 0
querytest.php
[DEBUG] Try to execute command (PHP5): php -d include_path=";C:\unifiedpost\dev\testt/src/main/php;C:\unifiedpost\dev\testt//src/test/php;C:\unifiedpost\dev\testt/target/phpinc;C:\
unifiedpost\dev\testt\src\test\php\cron\common\test;C:\unifiedpost\dev\testt/target/test-classes;C:\unifiedpost\dev\testt/target/classes;" "C:\unifiedpost\dev\testt/target/phpinc/P
HPUnit/TextUI/Maven.php" "C:\unifiedpost\dev\testt\src\test\php\cron\common\test\querytest.php" "C:\unifiedpost\dev\testt\target\surefire-reports/querytest.xml"
[INFO] php.out: PHPUnit 3.4.0 by Sebastian Bergmann.
[INFO] php.out:
[INFO] php.out: ..
[INFO] php.out:
[INFO] php.out: Time: 0 seconds
[INFO] php.out:
[INFO] php.out: OK (2 tests, 2 assertions)
[ERROR] Testcase: querytest.php fails.
[ERROR] See log: C:\unifiedpost\dev\testt\target\surefire-reports/querytest.txt
[ERROR] Testcase: querytest.php fails.
[ERROR] See log: C:\unifiedpost\dev\testt\target\surefire-reports/querytest.txt
[DEBUG]
org.apache.maven.plugin.MojoExecutionException:
PHPUnit 3.4.0 by Sebastian Bergmann...Time: 0 secondsOK (2 tests, 2 assertions) in
File:
C:\unifiedpost\dev\testt\src\test\php\cron\common\test\querytest.php
Command:
php -d include_path=";C:\unifiedpost\dev\testt/src/main/php;C:\unifiedpost\dev\testt//src/test/php;C:\unifiedpost\dev\testt/target/phpinc;C:\unifiedpost\dev\testt\src\test\php\cro
n\common\test;C:\unifiedpost\dev\testt/target/test-classes;C:\unifiedpost\dev\testt/target/classes;" "C:\unifiedpost\dev\testt/target/phpinc/PHPUnit/TextUI/Maven.php" "C:\unifiedpo
st\dev\testt\src\test\php\cron\common\test\querytest.php" "C:\unifiedpost\dev\testt\target\surefire-reports/querytest.xml"+
at org.phpmaven.plugin.build.PhpUnitCompile.executePhpFile(PhpUnitCompile.java:251)
at org.phpmaven.plugin.build.AbstractPhpCompile.directoryWalkStep(AbstractPhpCompile.java:320)
at org.codehaus.plexus.util.DirectoryWalker.fireStep(DirectoryWalker.java:174)
at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:392)
at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
at org.codehaus.plexus.util.DirectoryWalker.scanDir(DirectoryWalker.java:386)
at org.codehaus.plexus.util.DirectoryWalker.scan(DirectoryWalker.java:345)
at org.phpmaven.plugin.build.AbstractPhpCompile.goRecursiveAndCall(AbstractPhpCompile.java:348)
at org.phpmaven.plugin.build.PhpUnitCompile.execute(PhpUnitCompile.java:96)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.phpmaven.plugin.build.PhpCompileException:
PHPUnit 3.4.0 by Sebastian Bergmann...Time: 0 secondsOK (2 tests, 2 assertions) in
File:
C:\unifiedpost\dev\testt\src\test\php\cron\common\test\querytest.php
Command:
php -d include_path=";C:\unifiedpost\dev\testt/src/main/php;C:\unifiedpost\dev\testt//src/test/php;C:\unifiedpost\dev\testt/target/phpinc;C:\unifiedpost\dev\testt\src\test\php\cro
n\common\test;C:\unifiedpost\dev\testt/target/test-classes;C:\unifiedpost\dev\testt/target/classes;" "C:\unifiedpost\dev\testt/target/phpinc/PHPUnit/TextUI/Maven.php" "C:\unifiedpo
st\dev\testt\src\test\php\cron\common\test\querytest.php" "C:\unifiedpost\dev\testt\target\surefire-reports/querytest.xml"+
at org.phpmaven.plugin.build.PhpUnitCompile.executePhpFile(PhpUnitCompile.java:241)
... 28 more
[DEBUG] --- Compiling has finished.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO]
PHPUnit 3.4.0 by Sebastian Bergmann...Time: 0 secondsOK (2 tests, 2 assertions) in
File:
C:\unifiedpost\dev\testt\src\test\php\cron\common\test\querytest.php
Command:
php -d include_path=";C:\unifiedpost\dev\testt/src/main/php;C:\unifiedpost\dev\testt//src/test/php;C:\unifiedpost\dev\testt/target/phpinc;C:\unifiedpost\dev\testt\src\test\php\cro
n\common\test;C:\unifiedpost\dev\testt/target/test-classes;C:\unifiedpost\dev\testt/target/classes;" "C:\unifiedpost\dev\testt/target/phpinc/PHPUnit/TextUI/Maven.php" "C:\unifiedpo
st\dev\testt\src\test\php\cron\common\test\querytest.php" "C:\unifiedpost\dev\testt\target\surefire-reports/querytest.xml"+
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException:
PHPUnit 3.4.0 by Sebastian Bergmann...Time: 0 secondsOK (2 tests, 2 assertions) in
File:
C:\unifiedpost\dev\testt\src\test\php\cron\common\test\querytest.php
Command:
php -d include_path=";C:\unifiedpost\dev\testt/src/main/php;C:\unifiedpost\dev\testt//src/test/php;C:\unifiedpost\dev\testt/target/phpinc;C:\unifiedpost\dev\testt\src\test\php\cro
n\common\test;C:\unifiedpost\dev\testt/target/test-classes;C:\unifiedpost\dev\testt/target/classes;" "C:\unifiedpost\dev\testt/target/phpinc/PHPUnit/TextUI/Maven.php" "C:\unifiedpo
st\dev\testt\src\test\php\cron\common\test\querytest.php" "C:\unifiedpost\dev\testt\target\surefire-reports/querytest.xml"+
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException:
PHPUnit 3.4.0 by Sebastian Bergmann...Time: 0 secondsOK (2 tests, 2 assertions) in
File:
C:\unifiedpost\dev\testt\src\test\php\cron\common\test\querytest.php
Command:
php -d include_path=";C:\unifiedpost\dev\testt/src/main/php;C:\unifiedpost\dev\testt//src/test/php;C:\unifiedpost\dev\testt/target/phpinc;C:\unifiedpost\dev\testt\src\test\php\cro
n\common\test;C:\unifiedpost\dev\testt/target/test-classes;C:\unifiedpost\dev\testt/target/classes;" "C:\unifiedpost\dev\testt/target/phpinc/PHPUnit/TextUI/Maven.php" "C:\unifiedpo
st\dev\testt\src\test\php\cron\common\test\querytest.php" "C:\unifiedpost\dev\testt\target\surefire-reports/querytest.xml"+
at org.phpmaven.plugin.build.PhpUnitCompile.execute(PhpUnitCompile.java:116)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: org.phpmaven.plugin.build.MuilplePhpCompileException:
PHPUnit 3.4.0 by Sebastian Bergmann...Time: 0 secondsOK (2 tests, 2 assertions) in
File:
C:\unifiedpost\dev\testt\src\test\php\cron\common\test\querytest.php
Command:
php -d include_path=";C:\unifiedpost\dev\testt/src/main/php;C:\unifiedpost\dev\testt//src/test/php;C:\unifiedpost\dev\testt/target/phpinc;C:\unifiedpost\dev\testt\src\test\php\cro
n\common\test;C:\unifiedpost\dev\testt/target/test-classes;C:\unifiedpost\dev\testt/target/classes;" "C:\unifiedpost\dev\testt/target/phpinc/PHPUnit/TextUI/Maven.php" "C:\unifiedpo
st\dev\testt\src\test\php\cron\common\test\querytest.php" "C:\unifiedpost\dev\testt\target\surefire-reports/querytest.xml"+
at org.phpmaven.plugin.build.AbstractPhpCompile.goRecursiveAndCall(AbstractPhpCompile.java:350)
at org.phpmaven.plugin.build.PhpUnitCompile.execute(PhpUnitCompile.java:96)
... 19 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15 seconds
[INFO] Finished at: Thu May 06 16:25:10 EEST 2010
[INFO] Final Memory: 12M/22M
[INFO] ------------------------------------------------------------------------
Ben PHPUnit için 3.3.9 daha yeni bir sürümünü kullanıyorsanız, sadece bu olur. Testler PHPUnit 3.3.9 ile sadece iyi çalışır.