Passing parameters to PHPUnit

后端 未结 9 620
我寻月下人不归
我寻月下人不归 2020-12-24 11:03

I\'m starting to write PHPUnit tests and I\'d like the tests to be run from developers machines as well as from our servers. Developers machines are set up differently than

9条回答
  •  春和景丽
    2020-12-24 11:26

    All the solutions here are valid for the question, but there is yet another way that might be simpler for some situations. Phing will take arguments passed in the form -Dargument=value

    So using phing -Dtest=MyTest.class.php

    You can then use phing conditionals to handle these arguments:

    
        
        
            
        
        
            
        
    
    
    

提交回复
热议问题