Monday, 15 September 2014

php - Where to store a common PHPUnit_Framework_TestCase subclass -



php - Where to store a common PHPUnit_Framework_TestCase subclass -

i have growing basetestcase extends phpunit_framework_testcase. have 2 repositories utilize mutual library (all internal company code).

both repositories require of basetestcase functionality. question is;

do store basetestcase class in mutual library , create dependancy on phpunit. or duplicate basetestcase each repository? or there solution cant see?

if you're using composer manager dependencies. i'd recommend creating separate composer package in own repository solely basetestcase class. can require each of repositories.

class="lang-json prettyprint-override">"require-dev": { "your-company/test-case": "dev-master" }, "repositories": [ { "type": "vcs", "url": "<your clone url>" } ]

this way don't duplicate code across repositories, , avoid polluting mutual library testing tools.

check out composer documentation on private repositories more information.

php phpunit

No comments:

Post a Comment