Passing parameters to PHPUnit

后端 未结 9 631
我寻月下人不归
我寻月下人不归 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:40

    If you would like to run tests on remote machine, use ssh then run it. On locale machine you only have to cd to your root dir, then run phpunit.

    user@local:/path/to/your/project$ phpunit
    user@remote:/var/www/project$ phpunit
    

    Edit: You are talking about a machine dependent configuration. (What kind of conf btw?) My solution is to put these config under the same, not versioncontrolled place, then read/parse it runtime, in the needed set up methds for example.

提交回复
热议问题