0

Hi All I have gone through many related question to this problem but I am still unable to get the solution. I have installed Zend Server. Now I want to install PHPunit. I have installed pear and then installed PHPUnit.

My Zend Server is installed at

C:\xyz\zend\ZendServer

My pear is installed at

C:\xyz\zend\ZendServer\bin\PEAR

And PHPunit is installed at

C:\xyz\zend\ZendServer\bin\PEAR\pear\PHPUnit

I have added pear path and even PHPUnit path to Envrionmental PATH variable. Then I opened php.ini located at

C:\xyz\zend\ZendServer\etc

and set include_path as

include_path = ".;c:\php\includes;c:\xyz\zend\ZendServer\bin\PEAR\pear;c:\xyz\zend\ZendServer\bin\PEAR\pear\PHPUnit"

Now When I run command at cmd to create zend project, the project is created but I found this note too

Testing Note: PHPUnit was not found in your include_path, therefore no testing action will be created.

Some one please tell me what Am I doing wrong and where to set this include path???

Best Regards :-)

3
  • Try to add PHPUnit.bat to your Systempath in Windows Commented Nov 20, 2012 at 7:08
  • Are you absolutely sure PHPUnit can be found in the C:\xyz\zend\ZendServer\bin\PEAR\pear directory? If you look in that directory you should see a directory named PHPUnit, and within it should be the PHPUnit php src files. I ask, because it's unusual for PHPUnit to be with the bin directory. Commented Feb 19, 2013 at 1:52
  • @BullfrogBlues Yes I am pretty sure :-) Commented Feb 19, 2013 at 7:05

1 Answer 1

2

Let's do some old school debugging :)

$ zf create project ./one
Creating project at /path/to/one
Note: This command created a web project, for more information setting up your VHOST, please see docs/README
Testing Note: PHPUnit was not found in your include_path, therefore no testing actions will be created.

No PHPUnit!

Locate path/zend-framework/bin/zf.php and add near the top:

var_dump(get_include_path());

Now let's see what the include path looks like:

$ zf create project ./two
string(32) ".:/usr/share/php"
Creating project at /path/to/two
Note: This command created a web project, for more information setting up your VHOST, please see docs/README
Testing Note: PHPUnit was not found in your include_path, therefore no testing actions will be created

My PHPUnit isn't in the /usr/share/php directory. Let's resolve that by adding PHPUnit to the include path.

e.g. If PHPUnit is in /path/to/phpunit, open the php.ini file and add it to the include path.

Third times a charm:

$ zf create project ./three
string(56) ".:/usr/share/php:/path/to/phpunit"
Creating project at /path/to/three
Note: This command created a web project, for more information setting up your VHOST, please see docs/README

If you've edited the correct php.ini, the var_dump() you added to zf.php will now echo the include path with whatever you modified it to, which in my case it was correct, so now PHPUnit is working.

Now remove the debug code from zf.php

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

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.