InteractsWithDatabase

trait InteractsWithDatabase (View source)

Methods

$this seeInDatabase(string $table, array $data, string $connection = null)

Assert that a given where condition exists in the database.

$this missingFromDatabase(string $table, array $data, string $connection = null)

Assert that a given where condition does not exist in the database.

$this dontSeeInDatabase(string $table, array $data, string $connection = null)

Assert that a given where condition does not exist in the database.

$this notSeeInDatabase(string $table, array $data, string $connection = null)

Assert that a given where condition does not exist in the database.

$this seed(string $class = 'DatabaseSeeder')

Seed a given database connection.

Details

protected $this seeInDatabase(string $table, array $data, string $connection = null)

Assert that a given where condition exists in the database.

Parameters

string $table
array $data
string $connection

Return Value

$this

protected $this missingFromDatabase(string $table, array $data, string $connection = null)

Assert that a given where condition does not exist in the database.

Parameters

string $table
array $data
string $connection

Return Value

$this

protected $this dontSeeInDatabase(string $table, array $data, string $connection = null)

Assert that a given where condition does not exist in the database.

Parameters

string $table
array $data
string $connection

Return Value

$this

protected $this notSeeInDatabase(string $table, array $data, string $connection = null)

Assert that a given where condition does not exist in the database.

Parameters

string $table
array $data
string $connection

Return Value

$this

$this seed(string $class = 'DatabaseSeeder')

Seed a given database connection.

Parameters

string $class

Return Value

$this

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.3/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.html