public function seeNumRecords($expectedNum, $table, $attributes = [])
    {
        if (class_exists($table)) {
            $currentNum = $this->countModels($table, $attributes);
            $this->assertEquals(
                $expectedNum,
                $currentNum,
                "The number of found {$table} ({$currentNum}) does not match expected number {$expectedNum} with " . json_encode($attributes)
            );
        } else {
            $currentNum = $this->countRecords($table, $attributes);
            $this->assertEquals(
                $expectedNum,
                $currentNum,
                "The number of found records in table {$table} ({$currentNum}) does not match expected number $expectedNum with " . json_encode($attributes)
            );
        }
    }
public function seeNumRecords($expectedNum, $table, $attributes = [])
    {
        if (class_exists($table)) {
            $currentNum = $this->countModels($table, $attributes);
            $this->assertEquals(
                $expectedNum,
                $currentNum,
                "The number of found {$table} ({$currentNum}) does not match expected number {$expectedNum} with " . json_encode($attributes)
            );
        } else {
            $currentNum = $this->countRecords($table, $attributes);
            $this->assertEquals(
                $expectedNum,
                $currentNum,
                "The number of found records in table {$table} ({$currentNum}) does not match expected number $expectedNum with " . json_encode($attributes)
            );
        }
    }
public function seeNumRecords ( $ expectedNum , $ table , $ attributes = [ ] ) { if ( class_exists ( $ table ) ) { $ currentNum = $ this -> countModels ( $ table , $ attributes ) ; $ this -> assertEquals ( $ expectedNum , $ currentNum , "The number of found {$table} ({$currentNum}) does not match expected number {$expectedNum} with " . json_encode ( $ attributes ) ) ; } else { $ currentNum = $ this -> countRecords ( $ table , $ attributes ) ; $ this -> assertEquals ( $ expectedNum , $ currentNum , "The number of found records in table {$table} ({$currentNum}) does not match expected number $expectedNum with " . json_encode ( $ attributes ) ) ; } }
Checks that number of given records were found in database.
You can pass the name of a database table or the class name of an Eloquent model as the first argument.

``` php
<?php
$I->seeNumRecords(1, 'users', array('name' => 'davert'));
$I->seeNumRecords(1, 'App\User', array('name' => 'davert'));
?>
```

@param integer $expectedNum
@param string $table
@param array $attributes
@part orm
Checks that number of given records were found in database . You can pass the name of a database table or the class name of an Eloquent model as the first argument .