How do you install PHPUnit without using PEAR on Mac OS X 10.5?

后端 未结 5 1010
粉色の甜心
粉色の甜心 2020-12-31 20:42

I am having trouble installing PEAR, but I really only want to install PHPUnit. Does anyone have experience doing this?

5条回答
  •  孤独总比滥情好
    2020-12-31 21:20

    Install via GIT

    You can follow the instructions from the Git README: https://github.com/sebastianbergmann/phpunit/

    "git" the files and drop them in your home directory

    cd ~ && mkdir phpunit && cd phpunit
    git clone git://github.com/sebastianbergmann/phpunit.git
    git clone git://github.com/sebastianbergmann/dbunit.git
    git clone git://github.com/sebastianbergmann/php-file-iterator.git
    git clone git://github.com/sebastianbergmann/php-text-template.git
    git clone git://github.com/sebastianbergmann/php-code-coverage.git
    git clone git://github.com/sebastianbergmann/php-token-stream.git
    git clone git://github.com/sebastianbergmann/php-timer.git
    git clone git://github.com/sebastianbergmann/phpunit-mock-objects.git
    git clone git://github.com/sebastianbergmann/phpunit-selenium.git
    

    setup a personal binary path

    cd ~ && mkdir bin
    vi ~/.profile
    >> export PATH=$HOME/bin:$PATH
    >> :wq
    source ~/.profile
    

    create the executable

    touch ~/bin/phpunit
    chmod 755 ~/bin/phpunit
    

    write the executable

    #!/usr/bin/env php
    

    test the executable

    which phpunit
    phpunit --version
    

提交回复
热议问题