Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有我可以使用的函数来返回我的 phpunit 测试是否正在使用以下命令在单独的进程中运行?
@runTestsInSeparateProcesses @preserveGlobalState disabled
我正在尝试编写一个条件语句,例如
if ( _being_run_in_separate_process_ ){ } else{ }
非常感谢!
您可以访问该属性PHPUnit_Framework_TestCase::runTestInSeparateProcess。像这样:
PHPUnit_Framework_TestCase::runTestInSeparateProcess
if($this->runTestInSeparateProcess) { ... }