Skip to content
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

[7.x] Add assertDatabaseCount assertion #32597

Merged
merged 3 commits into from
Apr 29, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update CountInDatabase.php
  • Loading branch information
taylorotwell authored Apr 29, 2020
commit 66422e86d780fbb9e306c47eb50b04fdd8bd82ea
3 changes: 1 addition & 2 deletions src/Illuminate/Testing/Constraints/CountInDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class CountInDatabase extends Constraint
*
* @param \Illuminate\Database\Connection $database
* @param int $expectedCount
*
* @return void
*/
public function __construct(Connection $database, int $expectedCount)
Expand All @@ -54,7 +53,7 @@ public function matches($table): bool
{
$this->actualCount = $this->database->table($table)->count();

return $this->actualCount === $this->expectedCount;
return $this->actualCount === $this->expectedCount;
}

/**
Expand Down