Hi All,

We have website on Shared hosting. I am a newbie.
i have installed PHPUnit testing framework on the server.
When i try to run a test case in command mode(phpunit --help), i am getting error as attached screenshot.

Kindly help me in executing PHPUnit.

Regards,

Member Avatar for LastMitch

When i try to run a test case in command mode(phpunit --help), i am getting error as attached screenshot.

What is the error?

Not finding the directory is not a actual error it means you didn't installed it correctly.

If it was an error. It will tell you which line in which file that the error occur.

Then you have to post the code snippet on Daniweb to see why/what the error is/appear.

Read this closely on how to install phpunit with pear:

http://pear.phpunit.de/

http://www.phpunit.de/manual/3.7/en/installation.html

Thanks LastMitch!!!
Yeah It was not Installed Properly.

if your operating system is ubuntu

sudo apt-get remove phpunit
sudo pear upgrade PEAR
sudo pear install pear.phpunit.de/PHPUnit
sudo pear upgrade pear
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover component.ez.no
sudo pear channel-discover components.e
sudo pear channel-discover pear.symfony-project.com
sudo pear channel-discover pear.symfony.com
sudo pear update-channels
sudo pear update-all
sudo pear install pear.symfony.com/yam1
sudo pear install pear.symfony.com/Yam1
sudo pear install pear.symfony.com/Yaml
sudo pear install --alldeps phpunit/PHPUnit
sudo pear install --force --alldeps phpunit/PHPUnit

to ensure if phpunit install or not make this command

phpunit --version

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.