On this page
TestComponent
class TestComponent (View source)
Properties
Component | $component | The original component. |
|
protected string | $rendered | The rendered component contents. |
Methods
void | __construct(Component $component, View $view) Create a new test component instance. |
|
$this | assertSee(string $value, bool $escape = true) Assert that the given string is contained within the rendered component. |
|
$this | assertSeeInOrder(array $values, bool $escape = true) Assert that the given strings are contained in order within the rendered component. |
|
$this | assertSeeText(string $value, bool $escape = true) Assert that the given string is contained within the rendered component text. |
|
$this | assertSeeTextInOrder(array $values, bool $escape = true) Assert that the given strings are contained in order within the rendered component text. |
|
$this | assertDontSee(string $value, bool $escape = true) Assert that the given string is not contained within the rendered component. |
|
$this | assertDontSeeText(string $value, bool $escape = true) Assert that the given string is not contained within the rendered component text. |
|
string | __toString() Get the string contents of the rendered component. |
|
mixed | __get(string $attribute) Dynamically access properties on the underlying component. |
|
mixed | __call(string $method, array $parameters) Dynamically call methods on the underlying component. |
Details
$this assertSee(string $value, bool $escape = true)
Assert that the given string is contained within the rendered component.
$this assertSeeInOrder(array $values, bool $escape = true)
Assert that the given strings are contained in order within the rendered component.
$this assertSeeText(string $value, bool $escape = true)
Assert that the given string is contained within the rendered component text.
$this assertSeeTextInOrder(array $values, bool $escape = true)
Assert that the given strings are contained in order within the rendered component text.
$this assertDontSee(string $value, bool $escape = true)
Assert that the given string is not contained within the rendered component.
$this assertDontSeeText(string $value, bool $escape = true)
Assert that the given string is not contained within the rendered component text.
string __toString()
Get the string contents of the rendered component.
mixed __get(string $attribute)
Dynamically access properties on the underlying component.
mixed __call(string $method, array $parameters)
Dynamically call methods on the underlying component.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Testing/TestComponent.html