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) Утверждение, что заданная запись была удалена. | |
| Подключение | 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 Подключение 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.7/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.html