phpunit throws “Argument #3 (No Value) of PHPUnit_TextUI_ResultPrinter::__construct() must be a value from ”never“, ”auto“ or ”always“”

后端 未结 2 1753
感动是毒
感动是毒 2021-01-13 04:03

I\'m just test playing with Php unit.

Here is my DependencyFailureTest class:

require_once \'../vendor/autoload.php\';
use PHPUnit\\Framework\\TestC         


        
2条回答
  •  粉色の甜心
    2021-01-13 04:24

    It must be a configuration issue. I copied your code and ran it on the command line with verbose and it worked fine with version 5.4.6.

    I would reinstall phpunit and ensure you have the latest version.

    Also, their sample test case from their Getting Started page is:

    negate();
    
            // Assert
            $this->assertEquals(-1, $b->getAmount());
        }
    
        // ...
    }
    

    https://phpunit.de/getting-started.html

    Notice the difference in your extension usage, although I don't think it is an issue, if you use their declaration as stated, it helps to isolate the problem.

提交回复
热议问题