Property | Type | Description | |
---|---|---|---|
$crawler | The DomCrawler instance. | ||
$currentUri | string | The current URL being viewed. | |
$inputs | array | All of the stored inputs for the current page. | |
$response | Illuminate\Http\Response | The last response returned by the application. |
Method | Description | |
---|---|---|
action ( string $method, string $action, array $wildcards = [], array $parameters = [], array $cookies = [], array $files = [], array $server = [], string $content = null ) : Illuminate\Http\Response | Call a controller action and return the Response. | |
call ( string $method, string $uri, array $parameters = [], array $cookies = [], array $files = [], array $server = [], string $content = null ) : Illuminate\Http\Response | Call the given URI and return the Response. | |
callSecure ( string $method, string $uri, array $parameters = [], array $cookies = [], array $files = [], array $server = [], string $content = null ) : Illuminate\Http\Response | Call the given HTTPS URI and return the Response. | |
delete ( string $uri, array $data = [], array $headers = [] ) | Visit the given URI with a DELETE request. | |
dump ( ) : void | Dump the content from the last response. | |
get ( string $uri, array $headers = [] ) | Visit the given URI with a GET request. | |
handle ( Illuminate\Http\Request $request ) | Send the given request through the application. | |
patch ( string $uri, array $data = [], array $headers = [] ) | Visit the given URI with a PATCH request. | |
post ( string $uri, array $data = [], array $headers = [] ) | Visit the given URI with a POST request. | |
put ( string $uri, array $data = [], array $headers = [] ) | Visit the given URI with a PUT request. | |
route ( string $method, string $name, array $routeParameters = [], array $parameters = [], array $cookies = [], array $files = [], array $server = [], string $content = null ) : Illuminate\Http\Response | Call a named route and return the Response. | |
seeJson ( array $data = null ) | Assert that the response contains JSON. | |
seeJsonEquals ( array $data ) | Assert that the response contains an exact JSON array. | |
visit ( string $uri ) | Visit the given URI with a GET request. | |
withoutMiddleware ( ) | Disable middleware for the test. |
Method | Description | |
---|---|---|
assertFilterProducesResults ( string $filter ) : void | Assert that a filtered Crawler returns nodes. | |
assertPageLoaded ( string $uri, string | null $message = null ) : void | Assert that a given page successfully loaded. | |
attach ( string $absolutePath, string $element ) | Attach a file to a form field on the page. | |
check ( string $element ) | Check a checkbox on the page. | |
clearInputs ( ) | Clear the inputs for the current page. | |
click ( string $name ) | Click a link with the given body, name, or ID attribute. | |
dontSee ( string $text ) | Assert that a given string is not seen on the page. | |
extractParametersFromForm ( |
Extract the parameters from the given form. | |
fillForm ( string $buttonText, array $inputs = [] ) : |
Fill the form with the given data. | |
filterByNameOrId ( string $name, string $element = '*' ) : |
Filter elements according to the given name or ID attribute. | |
followRedirects ( ) | Follow redirects from the last response. | |
formatToExpectedJson ( string $key, mixed $value ) : string | Format the given key and value into a JSON string for expectation checks. | |
getForm ( string | null $buttonText = null ) : |
Get the form from the page with the given submit button text. | |
landOn ( string $uri ) | Assert that the current page matches a given URI. | |
makeRequest ( string $method, string $uri, array $parameters = [], array $cookies = [], array $files = [] ) | Make a request to the application and create a Crawler instance. | |
makeRequestUsingForm ( |
Make a request to the application using the given form. | |
onPage ( string $uri ) | Assert that the current page matches a given URI. | |
prepareUrlForRequest ( string $uri ) : string | Turn the given URI into a fully qualified URL. | |
press ( string $buttonText ) | Submit a form using the button with the given text value. | |
receiveJson ( array | null $data = null ) | Assert that the response contains JSON. | |
see ( string $text, boolean $negate = false ) | Assert that a given string is seen on the page. | |
seeJsonContains ( array $data ) | Assert that the response contains the given JSON. | |
seePageIs ( string $uri ) | Assert that the current page matches a given URI. | |
seeStatusCode ( integer $status ) | Asserts that the status code of the response matches the given code. | |
select ( string $option, string $element ) | Select an option from a drop-down. | |
shouldReturnJson ( array $data = null ) | Assert that the response contains JSON. | |
storeInput ( string $element, string $text ) | Store a form input in the local array. | |
submitForm ( string $buttonText, array $inputs = [] ) | Submit a form on the page with the given input. | |
transformHeadersToServerVars ( array $headers ) : array | Transform headers array to array of $_SERVER vars with HTTP_* format. | |
type ( string $text, string $element ) | Fill an input field with the given text. |
public action ( string $method, string $action, array $wildcards = [], array $parameters = [], array $cookies = [], array $files = [], array $server = [], string $content = null ) : Illuminate\Http\Response | ||
$method | string | |
$action | string | |
$wildcards | array | |
$parameters | array | |
$cookies | array | |
$files | array | |
$server | array | |
$content | string | |
return | Illuminate\Http\Response |
protected assertFilterProducesResults ( string $filter ) : void | ||
$filter | string | |
return | void |
public call ( string $method, string $uri, array $parameters = [], array $cookies = [], array $files = [], array $server = [], string $content = null ) : Illuminate\Http\Response | ||
$method | string | |
$uri | string | |
$parameters | array | |
$cookies | array | |
$files | array | |
$server | array | |
$content | string | |
return | Illuminate\Http\Response |
public callSecure ( string $method, string $uri, array $parameters = [], array $cookies = [], array $files = [], array $server = [], string $content = null ) : Illuminate\Http\Response | ||
$method | string | |
$uri | string | |
$parameters | array | |
$cookies | array | |
$files | array | |
$server | array | |
$content | string | |
return | Illuminate\Http\Response |
protected extractParametersFromForm ( |
||
$form | ||
return | array |
protected filterByNameOrId ( string $name, string $element = '*' ) : |
||
$name | string | |
$element | string | |
return |
protected followRedirects ( ) |
public handle ( Illuminate\Http\Request $request ) | ||
$request | Illuminate\Http\Request |
protected makeRequestUsingForm ( |
||
$form |
protected prepareUrlForRequest ( string $uri ) : string | ||
$uri | string | |
return | string |
protected receiveJson ( array | null $data = null ) | ||
$data | array | null |
public route ( string $method, string $name, array $routeParameters = [], array $parameters = [], array $cookies = [], array $files = [], array $server = [], string $content = null ) : Illuminate\Http\Response | ||
$method | string | |
$name | string | |
$routeParameters | array | |
$parameters | array | |
$cookies | array | |
$files | array | |
$server | array | |
$content | string | |
return | Illuminate\Http\Response |
protected seeJsonContains ( array $data ) | ||
$data | array |
public seeJsonEquals ( array $data ) | ||
$data | array |
protected seeStatusCode ( integer $status ) | ||
$status | integer |
protected shouldReturnJson ( array $data = null ) | ||
$data | array |
protected storeInput ( string $element, string $text ) | ||
$element | string | |
$text | string |
protected submitForm ( string $buttonText, array $inputs = [] ) | ||
$buttonText | string | |
$inputs | array |
protected transformHeadersToServerVars ( array $headers ) : array | ||
$headers | array | |
return | array |
protected Crawler,Symfony\Component\DomCrawler $crawler | ||
return |
protected string $currentUri | ||
return | string |
protected array $inputs | ||
return | array |