Results 1 to 3 of 3

Thread: Run phpunit from any folder

  1. #1
    Join Date
    Mar 2007
    Location
    S.West Greater London, UK
    Beans
    Hidden!
    Distro
    Ubuntu

    Question Run phpunit from any folder

    I am trying to get phpunit_selenium working, but am having some trouble with the PHPUnit pear installation. It is installed, and when I run phpunit from /usr/share/php it works fine. But ideally I would run this command from anywhere on my machine.

    This sounds like a very beginner question, but it would be very useful to know how to get this setup. Do I need to modify .bashrc with a new alias or something similar?

    Thanks for the advice.

    Dan
    Dan Duke
    www.retrobadger.net
    Freelance Web/Drupal Designer & Developer.

  2. #2
    Join Date
    Jul 2010
    Beans
    11

    Re: Run phpunit from any folder


  3. #3
    Join Date
    Mar 2007
    Location
    S.West Greater London, UK
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Run phpunit from any folder

    Thanks for the informative link, but sadly it didn't seem to work. The steps I took were:


    1.
    Change PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
    TO: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/share/php"
    in /etc/environment

    2.
    Reboot

    3. run 'phpunit', hoping for the help information (as that is what I receive if I cd into usr/share/php and run phpunit from there)


    Is there a step I potentially missed in changing this file. Myunderstanding from readin the introduction to that page was that PATH is used to try running the function before it fails, to see if it works in any of them. So in theory it would try my php/phpunit folder. I don't know if it's worth finding where the 'phpunit' variable is setup for /usr/share as there is no environment variable file in there that I can see.

    Thanks again for your advice.
    Dan Duke
    www.retrobadger.net
    Freelance Web/Drupal Designer & Developer.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •