ApplicationTrait
trait ApplicationTrait (View source)
Properties
protected Application | $app | The Illuminate application instance. | |
protected Client | $client | The HttpKernel client instance. |
Methods
void | refreshApplication() Refresh the application instance. | |
Response | call(string $method, string $uri, array $parameters = [], array $files = [], array $server = [], string $content = null, bool $changeHistory = true) Call the given URI and return the Response. | |
Response | callSecure(string $method, string $uri, array $parameters = [], array $files = [], array $server = [], string $content = null, bool $changeHistory = true) Call the given HTTPS URI and return the Response. | |
Response | action(string $method, string $action, array $wildcards = array(), array $parameters = array(), array $files = array(), array $server = array(), string $content = null, bool $changeHistory = true) Call a controller action and return the Response. | |
Response | route(string $method, string $name, array $routeParameters = array(), array $parameters = array(), array $files = array(), array $server = array(), string $content = null, bool $changeHistory = true) Call a named route and return the Response. | |
void | session(array $data) Set the session to the given array. | |
void | flushSession() Flush all of the current session data. | |
void | startSession() Start the session for the application. | |
void | be(UserInterface $user, string $driver = null) Set the currently logged in user for the application. | |
void | seed(string $class = 'DatabaseSeeder') Seed a given database connection. | |
Client | createClient(array $server = array()) Create a new HttpKernel client instance. |
Details
protected void refreshApplication()
Refresh the application instance.
Response call(string $method, string $uri, array $parameters = [], array $files = [], array $server = [], string $content = null, bool $changeHistory = true)
Call the given URI and return the Response.
Response callSecure(string $method, string $uri, array $parameters = [], array $files = [], array $server = [], string $content = null, bool $changeHistory = true)
Call the given HTTPS URI and return the Response.
Response action(string $method, string $action, array $wildcards = array(), array $parameters = array(), array $files = array(), array $server = array(), string $content = null, bool $changeHistory = true)
Call a controller action and return the Response.
Response route(string $method, string $name, array $routeParameters = array(), array $parameters = array(), array $files = array(), array $server = array(), string $content = null, bool $changeHistory = true)
Call a named route and return the Response.
void session(array $data)
Set the session to the given array.
void flushSession()
Flush all of the current session data.
protected void startSession()
Start the session for the application.
void be(UserInterface $user, string $driver = null)
Set the currently logged in user for the application.
void seed(string $class = 'DatabaseSeeder')
Seed a given database connection.
protected Client createClient(array $server = array())
Create a new HttpKernel client instance.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/4.2/Illuminate/Foundation/Testing/ApplicationTrait.html