Cannot run single test with data provider in PHPUnit

后端 未结 5 407
失恋的感觉
失恋的感觉 2021-02-05 12:13

I\'ve got a problem when using command line to run tests: if I run phpunit like this:

phpunit -–no-configuration -–filter testAdd DataTest DataProviderTest.php         


        
5条回答
  •  隐瞒了意图╮
    2021-02-05 13:01

    In this case, the regex is matched against the following string:

    DataTest::testAdd with data set #0
    DataTest::testAdd with data set #1
    ...
    

    So naturally your regex testAdd$ won't work.

提交回复
热议问题