InteractsWithViews
trait InteractsWithViews (View source)
Methods
| TestView | view(string $view, array $data = []) Создать новый TestView из заданного представления. | |
| TestView | blade(string $template, array $data = []) Отобразить содержимое заданной строки шаблона Blade. | |
| TestComponent | component(string $componentClass, array $data = []) Отобразить заданный компонент представления. | |
| $this | withViewErrors(array $errors, string $key = 'default') Заполнить общий пакет ошибок представления заданными ошибками. |
Details
protected TestView view(string $view, array $data = [])
Создать новый TestView из заданного представления.
protected TestView blade(string $template, array $data = [])
Отобразить содержимое заданной строки шаблона Blade.
protected TestComponent component(string $componentClass, array $data = [])
Отобразить заданный компонент представления.
protected $this withViewErrors(array $errors, string $key = 'default')
Заполнить общий пакет ошибок представления заданными ошибками.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Foundation/Testing/Concerns/InteractsWithViews.html