1

Pleaase help...

Inside my build.xml(under C:\xampp\php directory) is

 <?xml version="1.0" encoding="UTF-8"?>

     <project name="my_project" default="code_coverage" basedir=".">

     <fileset dir="C:/xampp/htdocs/phpunittest/classes" id="php">
       <include name="*.php"/>
     </fileset>

    <fileset dir="C:/xampp/htdocs/phpunittest/tests" id="tests">
      <include name="Test*.php"/>
    </fileset>

    <target name="code_coverage">

      <mkdir dir="coverage_db"/>
      <mkdir dir="coverage_result"/>

      <coverage-setup database="coverage_db/coverage.db">
        <fileset refid="php"/>
      </coverage-setup>

      <phpunit2 codecoverage="true" haltonerror="true">
        <batchtest>
          <fileset refid="tests"/>
        </batchtest>
      </phpunit2>

     <coverage-report outfile="coverage_db/coverage.xml">
        <report todir="coverage_result"/>
      </coverage-report>

      </target>
 </project>

In the command prompt :

I go to the php directory and typed

 phing

the build.xml is executed but in runtime i got a

fatal error "Class PHP_CodeCoverage_Filter not found in C:\xampp\php\PEAR\phing\tasks\ext\coverage\CoverageSetupTask.php on line 169"

I just installed the latest version of phpunit and phing by following this tutorial http://devzone.zend.com/article/2955 (please have a look) and cant figure out why im getting that error...

Im using Windows XP and Apache Server (XAMPP)

Is this a bug? If not, what could be the solution for this?

Please hellpp... i really2x need help

Any suggestions would be a great help for me

Thank you so much

1 Answer 1

1

You probably don't have the PHP_CodeCoverage package installed from the phpunit channel because you forced the installation of phpunit without knowing what you did.

Fix it by installing it:

$ pear install phpunit/PHP_CodeCoverage
Sign up to request clarification or add additional context in comments.

4 Comments

Hi cweiske, I followed what u said but it gives me a message "No releases available for package 'pear.phpunit.de/PHP_CodeCoverage'".. Any suggestions? thx
I uninstall xampp and install wampp... i still got that error... and now when i tried "pear install phpunit/PHP_CodeCoverage" , i got the mssage "php/PHPUnit is already installed and is the same as the release version 1.0.5"
Did you install phing via pear?
ohww.. sorry i solve it using pear install --force --alldeps phpunit/PHP_CodeCoverage

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.