public function shouldExistInTableARecordMatching($table, YamlStringNode $criteria)
    {
        $count = $this->countRecordsInTableMatching($table, $criteria->toArray());
        Assert::assertEquals(1, $count, sprintf('Does not exist any record in the database "%s" matching given conditions', $table));
    }
public function shouldExistInTableARecordMatching($table, YamlStringNode $criteria)
    {
        $count = $this->countRecordsInTableMatching($table, $criteria->toArray());
        Assert::assertEquals(1, $count, sprintf('Does not exist any record in the database "%s" matching given conditions', $table));
    }
public function shouldExistInTableARecordMatching ( $ table , YamlStringNode $ criteria ) { $ count = $ this -> countRecordsInTableMatching ( $ table , $ criteria -> toArray ( ) ) ; Assert :: assertEquals ( 1 , $ count , sprintf ( 'Does not exist any record in the database "%s" matching given conditions' , $ table ) ) ; }
Use a YAML syntax to create a criteria to match a record in given table

Example: Then should exist in table "post" a record matching:
"""
title: "Welcome"
body: "Welcome to web page"
"""

Expression syntax is allowed

Example: Then should exist in table "post" a record matching:
"""
title: "{variables.input.title}"
body: "{variables.input.body}"
"""

@Given /^should exist in table "([^"]*)" a record matching:$/
Use a YAML syntax to create a criteria to match a record in given table