我正在用 PHPUnit 编写一些测试,最近,我遇到了标志选项:--process-isolation在阅读了它在单独的 PHP 进程中运行每个测试之后,我认为在执行我的测试套件。但是,它不断引发异常,例如:
PHPUnit_Framework_Exception: stty: Standard Input: Invalid Argument
或者有时:
PHPUnit_Framework_Exception: Notice: Constant PEAR_ERROR_RETURN already defined in /usr/share/php/PEAR.php on line 25
Notice: Constant PEAR_ERROR_PRINT already defined in /usr/share/php/PEAR.php on line 26
Notice: Constant PEAR_ERROR_TRIGGER already defined in /usr/share/php/PEAR.php on line 27
Notice: Constant PEAR_ERROR_DIE already defined in /usr/share/php/PEAR.php on line 28
Notice: Constant PEAR_ERROR_CALLBACK already defined in /usr/share/php/PEAR.php on line 29
Notice: Constant PEAR_ERROR_EXCEPTION already defined in /usr/share/php/PEAR.php on line 34
Notice: Constant PEAR_ZE2 already defined in /usr/share/php/PEAR.php on line 37
Notice: Constant OS_WINDOWS already defined in /usr/share/php/PEAR.php on line 44
Notice: Constant OS_UNIX already defined in /usr/share/php/PEAR.php on line 45
Notice: Constant PEAR_OS already defined in /usr/share/php/PEAR.php on line 46
第一个异常仅在我激活进程隔离标志时出现,而我没有它,测试运行顺利且没有任何问题。第二个异常,起初,我认为这可能是由于包含冲突,但在查看并将所有包含更改为 include_once 之后,异常仍然不断出现。
任何帮助将不胜感激。