1

I am running OSX Lion with an installation of XAMPP. Setting up PEAR with XAMPP has proven to be difficult, but I got it work and installed PHPUnit. When I look in the XAMPP pear directory I see a folder called 'PHPUnit', and when I look in that folder, I see the following files:

Assert.php
RepeatedTest.php
TestCase.php
TestFailure.php
TestResult.php
GUI
Skeleton.php
TestDecorator.php
TestListener.php
TestSuite.php

When I run zf create project myproject, I get the following message:

Warning: require_once(PHPUnit/Framework.php): failed to open stream: No such file or directory in /Users/frankie/Websites/Libraries/ZendFramework-1.11.10/library/Zend/Test/PHPUnit/ControllerTestCase.php on line 29

I have no idea where to get this Framework.php file or how to fix this. Any help is appreciated.

3 Answers 3

3

Zend Framework requires you to run PHPUnit 3.5.x and I assume you have installed PHPUnit 3.6.x from pear.

Check out the guide on how to downgrade-phpunit-3-6-to-3-5-15 to fix your issue when running the ZF1 tests

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

1 Comment

I had to change the order of command execution in this guid because of the dependencies. Got the following error: phpunit/PHPUnit (version >= 3.6.0) can be optionally used by installed package "phing/phing" phpunit/PHPUnit (version >= 3.6.0) is required by installed package "phpunit/PHPUnit_Story" phpunit/PHPUnit (version >= 3.7.0) is required by installed package "phpunit/PHPUnit_Selenium" phpunit/PHPUnit cannot be uninstalled, other installed packages depend on this package So I uninstalled the packages first and the PHPUnit itself.
1

Check your bootstrap.php and disable fallback autoloader: Zend_Loader_Autoloader::getInstance()->setFallbackAutoloader(false);

Comments

0

I also had to uninstall phing and replace it by an older version:

sudo pear uninstall phing/phing
sudo pear install phing/phing-2.3.3

Comments

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.