New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a grabNumRecords to Db module #3175

Merged
merged 1 commit into from Jun 6, 2016

Conversation

Projects
None yet
3 participants
@kanewallmann
Contributor

kanewallmann commented Jun 5, 2016

You might want to compare how many records are in a table before and after some operations. The table might not be empty to begin with.

For example:

$count = $I->grabNumRecords( 'book' );
$I->click( 'Save' );
$I->see( 'Field is required' );
$I->seeNumRecords( 'book', $count );
Show outdated Hide outdated src/Codeception/Module/Db.php
*/
public function grabNumRecords($table, array $criteria = [])
{
return $this->countInDatabase( $table, $criteria );

This comment has been minimized.

@Nitpick-CI

Nitpick-CI Jun 5, 2016

  • Space after opening parenthesis of function call prohibited
  • Expected 0 spaces before closing bracket; 1 found
@Nitpick-CI

Nitpick-CI Jun 5, 2016

  • Space after opening parenthesis of function call prohibited
  • Expected 0 spaces before closing bracket; 1 found
@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Jun 6, 2016

Member

Thanks 👍

Member

DavertMik commented Jun 6, 2016

Thanks 👍

@DavertMik DavertMik merged commit 3f5197b into Codeception:2.2 Jun 6, 2016

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details

@DavertMik DavertMik added the Db label Jun 6, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment