franzliedke / studio

A workbench for developing Composer packages.
MIT License
1.14k stars 73 forks source link

Add some tests #71

Open rask opened 7 years ago

rask commented 7 years ago

There is only a single test available it seems. Would it be OK to contribute some tests? Also, could PHPUnit be used or is PhpSpec a 100% requirement? I'm more fluent with PHPUnit, but I presume PhpSpec is not that difficult to learn.

rask commented 7 years ago

Noticed the PHP League related issue and saw a mention of required minimum test code coverage. This would help with that too if League is still a goal of sorts.

franzliedke commented 7 years ago

I'd love it if you would add some test, thanks for the suggestion!

If you want to, you can switch to PhpUnit, no strong opinions there.

rask commented 7 years ago

Alrighty. Will send PRs when I get around to making some. Thanks for the information.

I read that PhpSpec shines in BDD/TDD (hence lack of coverage support "out-of-the-box": presumably BDD code is covered 100% as each test is created before any lines of any business logic), but as we are mostly retrofitting tests we can implement code coverage better with PHPUnit.

rask commented 7 years ago

Is there a current PHP version requirement in place? Need to know for tests so I won't write tests that explode if they're run on a version that is supposed to be supported. I presume at least 5.6 should be supported?

franzliedke commented 7 years ago

@rask Thanks for keeping it up.

According to the Travis setup, we currently support everything starting at PHP 5.4.

rask commented 7 years ago

Oh I missed the Travis config. Thanks for the pointer. Will try to keep it 5.4 friendly. :+1:

rask commented 7 years ago

I've been busy with life but made some progress with some tests for studio. I'll try to get a PR up this weekend or early next week.

franzliedke commented 7 years ago

Cool!

I will appreciate it whenever you submit something. No worries. :)