0

I'm using Windows 7.

I've used PHPUnit fine on this system in the past.

On starting a new project, I'm getting the error above on my first attempt to run a test.

I've cleared cache on pear, totally uninstalled and "--force --alldeps" reinstalled PHPUnit and all dependencies - including PHP_CodeCoverage.

Short of rewriting pear from scratch - anyone got any ideas how I can fix this?

[edit] Below is the output of the "pear config-show" and "pear info phpunit/PHPUnit" commands

C:\Users\Jim\Documents\code\seleniumtests\phpunit\common>pear config-show
CONFIGURATION (CHANNEL PEAR.PHP.NET):
=====================================
Auto-discover new Channels     auto_discover    1
Default Channel                default_channel  pear.php.net
HTTP Proxy Server Address      http_proxy       <not set>
PEAR server [DEPRECATED]       master_server    pear.php.net
Default Channel Mirror         preferred_mirror pear.php.net
Remote Configuration File      remote_config    <not set>
PEAR executables directory     bin_dir          C:\Program Files
                                                (x86)\Zend\ZendServer\bin\PEAR
PEAR documentation directory   doc_dir          C:\php5\pear\docs
PHP extension directory        ext_dir          C:\Program Files
                                                (x86)\Zend\ZendServer\lib\phpext
PEAR directory                 php_dir          C:\Program Files
                                                (x86)\Zend\ZendServer\bin\PEAR\pear
PEAR Installer cache directory cache_dir        C:\Users\Jim\AppData\Local\Temp\pear\cache
PEAR configuration file        cfg_dir          C:\php5\pear\cfg
directory
PEAR data directory            data_dir         C:\php5\pear\data
PEAR Installer download        download_dir     C:\Users\Jim\AppData\Local\Temp\pear\download
directory
PHP CLI/CGI binary             php_bin          C:\Program Files
                                                (x86)\Zend\ZendServer\bin\php.exe
php.ini location               php_ini          <not set>
--program-prefix passed to     php_prefix       <not set>
PHP's ./configure
--program-suffix passed to     php_suffix       <not set>
PHP's ./configure
PEAR Installer temp directory  temp_dir         C:\Users\Jim\AppData\Local\Temp\pear\temp
PEAR test directory            test_dir         C:\php5\pear\tests
PEAR www files directory       www_dir          C:\php5\pear\www
Cache TimeToLive               cache_ttl        3600
Preferred Package State        preferred_state  stable
Unix file mask                 umask            0
Debug Log Level                verbose          1
PEAR password (for             password         <not set>
maintainers)
Signature Handling Program     sig_bin          C:\Program Files
                                                (x86)\Git\bin\gpg.EXE
Signature Key Directory        sig_keydir       C:\Program Files
                                                (x86)\Zend\ZendServer\bin\PEAR\pear.ini\pearkeys
Signature Key Id               sig_keyid        <not set>
Package Signature Type         sig_type         gpg
PEAR username (for             username         <not set>
maintainers)
User Configuration File        Filename         C:\Program Files
                                                (x86)\Zend\ZendServer\bin\PEAR\pear.ini\pear.ini
System Configuration File      Filename         C:\Program Files
                                                (x86)\Zend\ZendServer\bin\PEAR\pear.ini\pearsys.ini

C:\Users\Jim\Documents\code\seleniumtests\phpunit\common>pear info phpunit/PHPUnit
ABOUT PEAR.PHPUNIT.DE/PHPUNIT-3.6.10
====================================
Release Type          PEAR-style PHP-based Package
Name                  PHPUnit
Channel               pear.phpunit.de
Summary               The PHP Unit Testing framework.
Description           The PHP Unit Testing framework.
Maintainers           Sebastian Bergmann <[email protected]> (lead)
Release Date          2012-01-27 10:49:19
Release Version       3.6.10 (stable)
API Version           3.6.0 (stable)
License               BSD License
Release Notes         http://github.com/sebastianbergmann/phpunit/blob/master/README.markdown
Required Dependencies PHP version 5.2.7
                      PEAR installer version 1.9.4 or newer
                      Package pear.phpunit.de/File_Iterator
                        Version 1.3.0 or newer
                      Package pear.phpunit.de/Text_Template
                        Version 1.1.1 or newer
                      Package pear.phpunit.de/PHP_CodeCoverage
                        Version 1.1.0 or newer
                      Package pear.phpunit.de/PHP_Timer
                        Version 1.0.1 or newer
                      Package pear.phpunit.de/PHPUnit_MockObject
                        Version 1.1.0 or newer
                      Package pear.symfony-project.com/YAML
                        Version 1.0.2 or newer
                      Extension dom
                      Extension pcre
                      Extension reflection
                      Extension spl
Optional Dependencies Package pear.phpunit.de/PHP_Invoker
                        Version 1.1.0 or newer
                      Extension json
                      Extension simplexml
                      Extension tokenizer
package.xml version   2.0
Last Modified         2012-03-17 16:52
Previous Installed    - None -
Version
5
  • Delete /usr/bin/phpunit and reinstall. Make sure it gets created anew and doesn't mention PHP_CodeCoverage_Filter at all. Commented Mar 17, 2012 at 23:40
  • Thanks David. Unfortunately, Windows doesn't have /usr/bin at all. I've uninstalled and reinstalled already - twice. Commented Mar 18, 2012 at 21:51
  • D'oh! I missed the first line about Windows 7. My guess is that you have an old installation on the system or user PATH. You need to find the phpunit.bat that gets run when you type phpunit on the command line and delete it. Commented Mar 18, 2012 at 21:58
  • 1
    What do the following commands show? pear config-show and pear info phpunit/PHPUnit Commented Mar 18, 2012 at 22:00
  • Thanks David - I've added the output of those commands to the question - does that give you any clues? I can't see any mention of selenium in there at all Commented Mar 24, 2012 at 14:07

1 Answer 1

2

In the end, I visited http://pear.phpunit.de/ and downloaded the latest PHP_CodeCoverage and PHPUnit_Selenium tar.gz files, uncompressed them, and copied all the files inside into matching folder locations within my PHPUnit install directory.

That seems to have done the trick!

Sign up to request clarification or add additional context in comments.

1 Comment

Which was your PHPUnit install dir? Having the same problem and can't find the correct directory to do the same.

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.