Skip to content

[8.x] Add $data param to assertDatabaseCount #32750

Closed
simoebenhida wants to merge 1 commit intolaravel:masterfrom
simoebenhida:master
Closed

[8.x] Add $data param to assertDatabaseCount #32750
simoebenhida wants to merge 1 commit intolaravel:masterfrom
simoebenhida:master

Conversation

@simoebenhida
Copy link
Copy Markdown
Contributor

This PR complete #32597

It adds $data params to assertDatabaseCount

MyCustomUserFactory::new()
    ->times(50)
    ->create(['name' => 'John']);

$this->assertDatabaseCount('users', 50, ['name' => 'John']);

@simoebenhida
Copy link
Copy Markdown
Contributor Author

@driesvints changed it to master 😀

@simoebenhida simoebenhida changed the title Add $data param to assertDatabaseCount [8.x] Add $data param to assertDatabaseCount May 11, 2020
@taylorotwell
Copy link
Copy Markdown
Member

Instead of a breaking change just do: $this->assertEquals(50, User::whereName('John')->count())

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants