blumilksoftware / blt

Behat+Laravel toolbox. Still in progress.
https://packagist.org/packages/blumilksoftware/blt
3 stars 0 forks source link

Eloquent step descriptions are bugged #10

Closed krzysztofrewak closed 1 year ago

krzysztofrewak commented 3 years ago

When I'm trying to use one of Eloquent helpers, I'm receiving an error.

Scenario:
  Then there are no "User" objects in database
Scenario: # features/eloquent/user.feature:7
  Then there are no "User" objects in database

Ambiguous match of "there are no "User" objects in database":
to `there are :count :model objects in database` from App\Testing\EloquentContext::thereAreModelsInDatabase()
to `there are no :model objects in database` from App\Testing\EloquentContext::thereAreModelsInDatabase()

We need to investigate it, but I can see there're many step descriptions in Blumilk\BLT\Features\Traits\Eloquent and some of them are ambiguous:

/**
 * @Given there are no :model objects in database
 * @Given there should be no :model objects in database
 * @Given there is :count :model object in database
 * @Given there should be :count :model object in database
 * @Given there are :count :model objects in database
 * @Given there should be :count :model objects in database
 */