studio
studio copied to clipboard
Add end-to-end testing
This PR adds support for end-to-end testing the plugin.
It basically uses the global composer command, installs the local version of the plugin and then you can add your own tests on top of that.
Right now only two tests are included:
- whether the plugin works at all
- to load a package + that composer then installs it correctly.
We should extend these tests to include all common commands, that are used with this package.
Questions for the future?
- As discussed: maybe remove the scaffolding part, to make this library as sharply focused as possible
- Add remaining tests cases (it will be a lot less if we remove scaffolding 😉 )
- Think about maybe moving the PHPSpec tests to PHPUnit? (I used PHPUnit because I am not quite sure on how to add these tests in PHPSpec)
~~The tests should fail as the commands are missing the return type + value.~~
they were added, so tests should be green
That was easy 😅