elliotchance / concise

✅ Concise is test framework for using plain English and minimal code, built on PHPUnit.
MIT License
45 stars 3 forks source link

Concise should not be recognising "function" for with() #154

Closed elliotchance closed 10 years ago

elliotchance commented 10 years ago
->expect('dispatch')->with(['MyClass', 'run'])

Will render as:

Expected dispatch(function) to be called once, but it was called never.

Which is cool but it would also cause a defect when dispatch() is called with some other valid callback.

elliotchance commented 10 years ago

This is a bigger problem because this code will not work:

$this->assert($result, has_key, 'Count', with_value, 0);

With the error:

Argument 2 (Count) must be string.
coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling 20015cd4a16e0a2c232e2216d0f795acc762e5b6 on 1.3.3/154-function-for-with into d1a51bc02120629ed3d7375884b0e023cfce8341 on release/1.3.3.

coveralls commented 10 years ago

Coverage Status

Coverage remained the same when pulling db4c12b2ef8d8de91273b7c0e89f5c78d9866f73 on 1.3.3/154-function-for-with into d1a51bc02120629ed3d7375884b0e023cfce8341 on release/1.3.3.

scrutinizer-notifier commented 10 years ago

A new inspection was created.