liip / LiipFunctionalTestBundle

Some helper classes for writing functional tests in Symfony
http://liip.ch
MIT License
639 stars 181 forks source link

WebTestCase makeClient method update #500

Closed DamienVauchel closed 5 years ago

DamienVauchel commented 5 years ago

Hi,

I detected an useless if condition on authentication so I removed it.

alexislefebvre commented 5 years ago

Thanks, with this change we can't pass an array as the first parameter. That's why there are 2 conditions. It looks like it's a breaking change and it should break internal tests of the bundle.

DamienVauchel commented 5 years ago

My bad! I didn't check it.

Don't you think it is kinda dirty to accept that an array argument could be a boolean (or a boolean argument be an array)? (Not a mean/troll question, I don't know if my english is perfect^^", it is a real question)

alexislefebvre commented 5 years ago

I agree with you, the fact that the first parameter accept two different types is confusing.

We should refactor this for the 3.x release, see #496

We may add a makeAuthentifiedClient() method in order to reduce the size and complexity of makeClient().

alexislefebvre commented 5 years ago

See #506.