InteractsWithDatabase
trait InteractsWithDatabase (View source)
Методы
| $this | assertDatabaseHas(string $table, array $data, string $connection = null) Утверждение, что заданное условие where существует в базе данных. | |
| $this | assertDatabaseMissing(string $table, array $data, string $connection = null) Утверждение, что заданное условие where не существует в базе данных. | |
| $this | assertSoftDeleted(string $table, array $data, string $connection = null) Утверждение, что данный запис удалён. | |
| Connection | getConnection(string|null $connection = null) Получение соединения с базой данных. | |
| $this | seed(string $class = 'DatabaseSeeder') Запуск посева для заданного соединения с базой данных. |
Подробности
protected $this assertDatabaseHas(string $table, array $data, string $connection = null)
Утверждение, что заданное условие where существует в базе данных.
protected $this assertDatabaseMissing(string $table, array $data, string $connection = null)
Утверждение, что заданное условие where не существует в базе данных.
protected $this assertSoftDeleted(string $table, array $data, string $connection = null)
Утверждение, что данный запис удалён.
protected Connection getConnection(string|null $connection = null)
Получение соединения с базой данных.
$this seed(string $class = 'DatabaseSeeder')
Запуск посева для заданного соединения с базой данных.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.4/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.html