TestMakeCommand::argument()

string|array argument(string $key = null) Get the value of a command argument. Parameters string $key Return Value string|array

TestMakeCommand::anticipate()

string anticipate(string $question, array $choices, string $default = null) Prompt the user for input with auto completion. Parameters string $question array $choices string $default Return Value string

TestMakeCommand

TestMakeCommand class TestMakeCommand extends GeneratorCommand (View source) Methods void __construct(Filesystem $files) Create a new controller creator command instance. from GeneratorCommand int run(InputInterface $input, OutputInterface $output) Run the console command. from Command int call(string $command, array $arguments = array()) Call another console command. from Command int callSilent(string $command, array $arguments = array()) Call another console command silently

Testing

Testing Introduction Environment Creating & Running Tests Introduction Laravel is built with testing in mind. In fact, support for testing with PHPUnit is included out of the box and a phpunit.xml file is already setup for your application. The framework also ships with convenient helper methods that allow you to expressively test your applications. An ExampleTest.php file is provided in the tests directory. After installing a new Laravel application, simply run phpunit on the command lin

TestCase::withSession()

$this withSession(array $data) Set the session to the given array. Parameters array $data Return Value $this

TestCase::withoutObservers()

$this withoutObservers(array|string $observers) Specify a list of observers that will not run for the given operation. Parameters array|string $observers Return Value $this

TestCase::withoutMiddleware()

$this withoutMiddleware() Disable middleware for the test. Return Value $this

TestCase::within()

$this within(string $element, Closure $callback) Narrow the test content to a specific area of the page. Parameters string $element Closure $callback Return Value $this

TestCase::visitRoute()

$this visitRoute(string $route, array $parameters = array()) Visit the given named route with a GET request. Parameters string $route array $parameters Return Value $this

TestCase::visit()

$this visit(string $uri) Visit the given URI with a GET request. Parameters string $uri Return Value $this