class Illuminate / Testing / TestComponent
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

TestComponent

Implements

  • Stringable

Properties

public

$component
  • Component
  • The original component.

    Default: null
    protected

    $rendered string

    The rendered component contents.

    Default: null

    Methods

    public

    __construct ( $component , $view ) : void

    Create a new test component instance.

    Parameters

    public

    assertSee ( $value , $escape ) : $this

    Assert that the given string is contained within the rendered component.

    Parameters

    • $value string
    • $escape bool
    public

    assertSeeInOrder ( array $values , $escape ) : $this

    Assert that the given strings are contained in order within the rendered component.

    Parameters

    • $values array
    • $escape bool
    public

    assertSeeText ( $value , $escape ) : $this

    Assert that the given string is contained within the rendered component text.

    Parameters

    • $value string
    • $escape bool
    public

    assertSeeTextInOrder ( array $values , $escape ) : $this

    Assert that the given strings are contained in order within the rendered component text.

    Parameters

    • $values array
    • $escape bool
    public

    assertDontSee ( $value , $escape ) : $this

    Assert that the given string is not contained within the rendered component.

    Parameters

    • $value string
    • $escape bool
    public

    assertDontSeeText ( $value , $escape ) : $this

    Assert that the given string is not contained within the rendered component text.

    Parameters

    • $value string
    • $escape bool
    public

    __toString ( ) : string

    Get the string contents of the rendered component.

    public

    __get ( $attribute ) : mixed

    Dynamically access properties on the underlying component.

    Parameters

    • $attribute string
    public

    __call ( $method , $parameters ) : mixed

    Dynamically call methods on the underlying component.

    Parameters

    • $method string
    • $parameters array