Closed dantleech closed 11 years ago
so far we added functional tests for phpcr-utils to phpcr-api-tests. this because we need an implementation for them, and the phpcr api tests already provide the test bed. could this make sense here too? (with automatically skip the tests if phpcr-utils classes are not available.
Personally prefer to work with one repository, i.e.
git clone ...
cd phpcr-utils
composer install --dev
phpunit -c phpunit.xml.dist ..
vim ...
This way the bundle is more self-contained, and I can do all the development I need to with the single repository. Also, if I push a PR to phpcr-utils, the tests are not going to get executed - so we lose automatic regression testing.
So I would push for more self-containment where it makes sense, this ticket would maybe be a good candidate for the Testing component.
you do have a point here, yes. maybe we could have jackalope-doctrine-dbal in require-dev of the utils to do functional tests here? ideally the tests themselves would be in a way that all jackalopes can also bootstrap and run them, like we do with the unit tests of phpcr, phpcr-utils and jackalope/jackalope today.
the testing component probably not, we should not need symfony and the cmf to test this.
actually I figured out that we can probably avoid functional tests for the Commands - the main problem was that the TreeWalker was doing loads of crazy stuff in the dump command - but we can refactor the tree walker into a helper and mock it. So hopefully we can put aside the functional testing issue - in theory PHPCR is great for mocking.
we do have quite some testing for commands now i think. do we need more or should we close this?
All commands are /unit/ tested. Don't know how much additional value we get from functional tests. The underlying stuff should work
David Buchmann notifications@github.com a écrit :
we do have quite some testing for commands now i think. do we need more or should we close this?
Reply to this email directly or view it on GitHub: https://github.com/phpcr/phpcr-utils/issues/58#issuecomment-19163817
Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.
Add functional tests for commands, see:
http://symfony.com/doc/2.0/components/console/introduction.html#testing-commands