Behat / WebApiExtension

Behat extension to test web APIs
http://extensions.behat.org
MIT License
111 stars 114 forks source link

Do not require phpunit on production #41

Closed soullivaneuh closed 8 years ago

soullivaneuh commented 8 years ago

PHPUnit is for your tests.

Lot of projects may not need it because of not using phpunit or use global version.

stof commented 8 years ago

no, phpunit is not for our tests. The code of the WebApiContext currently depends on PHPUnit assertions, so this is a hard requirement of the library (unfortunately the assertions are not yet standalone). PHPUnit code needs to be autoloadable from behat runs.

See #38 which is about removing this dependency.

soullivaneuh commented 8 years ago

The code of the WebApiContext currently depends on PHPUnit assertions

Yes, but what about global using of phpunit? I'm using .phar and I don't want to have a second phpunit to override it and have useless dependencies.

PHPUnit code needs to be autoloadable from behat runs.

What do you mean?

See #38 which is about removing this dependency.

Subscribed, thanks.

stof commented 8 years ago

Yes, but what about global using of phpunit?

the code inside your global PHPUnit phar won't be accessible by your behat suite to use the PHPUnit codebase

soullivaneuh commented 6 years ago

depends on PHPUnit assertions

AFAIK PHPUnit 6 use webmozart/assert.

Can't this be separated with PHPUnit 6 compatibility?

This is overkill for app to require the hole phpunit dependency.

stof commented 6 years ago

Well, PHPUnit assertions are still there in PHPUnit, and are not using webmozart/assert

soullivaneuh commented 6 years ago

@stof Indeed I was wrong.

Still, do you have any reason to use only PHPUnit assertion and not another library?

If not, you may migrate to a lighter one like webmozart/assert to get rid of the full phpunit requirement.

WDYT?