TestMakeCommand::ask()

string ask(string $question, string $default = null) Prompt the user for input. Parameters string $question 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

TestMakeCommand::argument()

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

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::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::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::withSession()

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

TestCase::withoutMiddleware()

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

TestCase::session()

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

TestCase::seeText()

$this seeText(string $text, bool $negate = false) Assert that a given string is seen on the current text. Parameters string $text bool $negate Return Value $this