PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, August 31, 2022

[FIXED] Where is the Pear PHPUnit command

 August 31, 2022     pear     No comments   

Issue

As you see in the image below, I have Pear installed, and there is a PhpUnit folder, but when I run this code (from a book on Yii),

    % phpunit functional/SiteTest.php

it's telling me

-bash: phpunit: command not found

I am assuming from the fact that Phpunit folder is present that I have correctly installed it. In fact, it said install o.k. in the terminal.

Any ideas where I can find this command?

enter image description here


Solution

Running

pear config-get bin_dir

will tell you the location where PEAR installs executables (like phpunit) to.

Having gotten the directory name, you want to add it to your PATH. One way to do this is to edit the .profile file in your home directory (it's hidden), and add the following line:

export PATH=<dir you got from pear config-get>:$PATH

and then either close and re-open your terminal, or run . ~/.profile.



Answered By - John Flatness
Answer Checked By - Senaida (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing