0

I have installed PHP Unit and done everything the instructions tell me.

I'm told that I can just run:

$ phpunit

...and it will work. I may need to specify the config file and I can do that.

I have changed the directory to the PHP Unit folder, but nothing.

I am using Mac's Terminal if this means anything.

I have tried (with the error shown):

$ phpunit        -        $: command not found
phpunit          -        phpunit: command not found
php phpunit      -        ...doesn't return an error, but doesn't do return anything
% phpunit        -        fg: %: no such job

Also, the folder structure is like this:

- phpunit
    - php-code-coverage
    - php-file-iterator
    - php-text-template
    - php-timer
    - php-token-stream
    - phpunit
    - phpunit-mock-objects
        phpunit.php
        - PHPUnit (folder)
            - various things inside

... what am I actually running? The outer folder, inner folder or the phpunit.php file?

I must be doing something wrong?

4

1 回答 1

2

我的问题:你是如何安装 PHPUnit 的?通过“手动”(下载并解压缩),通过 PEAR,...?

尝试执行(在 phpunit 文件夹内):

./phpunit

确保将 phpunit 可执行文件所在的路径添加到您的$PATH变量中。

关于如何安装 phpunit 的类似问题可以在这里找到,一般安装说明在这里

于 2013-09-05T07:58:12.547 回答