You can use tables in your steps:
And the result table should not contain:
|Value |
|Value1|
|Value2|
|Value3|
|Value4|
Behat will pass it to your step method as a TableNode instance:
/**
* @Given /the result table should not contain:/
*/
public function thePeopleExist(TableNode $table)
{
$hash = $table->getHash();
foreach ($hash as $row) {
// ...
}
}
Read more on writing features in the Gherkin language: http://docs.behat.org/guides/1.gherkin.html
Digression: Note that most of the time using Mink steps directly in your features is not the best idea since most of the time it's not the language of your business. Your scenario would be more readable and maintainable if you had written:
When I press "Delete"
Then I should be on the user page
And I should see a list of users
And the following users should be deleted:
|Name |
|Biruwon|
|Kuba |
|Anna |
In your step implementation you can use the default Mink steps by returning Then instance:
/**
* @Given /^I should see a list of users$/
*/
public function iShouldSeeListOfUsers()
{
return new Then('I should see "User list"');
}