studio icon indicating copy to clipboard operation
studio copied to clipboard

Add end-to-end testing

Open apfelbox opened this issue 4 years ago • 2 comments

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:

  1. whether the plugin works at all
  2. 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)

apfelbox avatar Dec 18 '20 12:12 apfelbox

~~The tests should fail as the commands are missing the return type + value.~~ 

they were added, so tests should be green

apfelbox avatar Dec 18 '20 12:12 apfelbox

That was easy 😅

apfelbox avatar Dec 18 '20 13:12 apfelbox