getScenario()->runStep(new \Codeception\Step\Action('getApplication', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * @param $app * @see \Codeception\Module\Laravel5::setApplication() */ public function setApplication($app) { return $this->getScenario()->runStep(new \Codeception\Step\Action('setApplication', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Disable middleware for the next requests. * * ``` php * disableMiddleware(); * ?> * ``` * @see \Codeception\Module\Laravel5::disableMiddleware() */ public function disableMiddleware() { return $this->getScenario()->runStep(new \Codeception\Step\Action('disableMiddleware', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Disable events for the next requests. * * ``` php * disableEvents(); * ?> * ``` * @see \Codeception\Module\Laravel5::disableEvents() */ public function disableEvents() { return $this->getScenario()->runStep(new \Codeception\Step\Action('disableEvents', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Make sure events fired during the test. * * ``` php * seeEventTriggered('App\MyEvent'); * $I->seeEventTriggered(new App\Events\MyEvent()); * $I->seeEventTriggered('App\MyEvent', 'App\MyOtherEvent'); * $I->seeEventTriggered(['App\MyEvent', 'App\MyOtherEvent']); * ?> * ``` * @param $events * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Module\Laravel5::seeEventTriggered() */ public function canSeeEventTriggered($events) { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeEventTriggered', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Make sure events fired during the test. * * ``` php * seeEventTriggered('App\MyEvent'); * $I->seeEventTriggered(new App\Events\MyEvent()); * $I->seeEventTriggered('App\MyEvent', 'App\MyOtherEvent'); * $I->seeEventTriggered(['App\MyEvent', 'App\MyOtherEvent']); * ?> * ``` * @param $events * @see \Codeception\Module\Laravel5::seeEventTriggered() */ public function seeEventTriggered($events) { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeEventTriggered', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Make sure events did not fire during the test. * * ``` php * dontSeeEventTriggered('App\MyEvent'); * $I->dontSeeEventTriggered(new App\Events\MyEvent()); * $I->dontSeeEventTriggered('App\MyEvent', 'App\MyOtherEvent'); * $I->dontSeeEventTriggered(['App\MyEvent', 'App\MyOtherEvent']); * ?> * ``` * @param $events * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Module\Laravel5::dontSeeEventTriggered() */ public function cantSeeEventTriggered($events) { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeEventTriggered', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Make sure events did not fire during the test. * * ``` php * dontSeeEventTriggered('App\MyEvent'); * $I->dontSeeEventTriggered(new App\Events\MyEvent()); * $I->dontSeeEventTriggered('App\MyEvent', 'App\MyOtherEvent'); * $I->dontSeeEventTriggered(['App\MyEvent', 'App\MyOtherEvent']); * ?> * ``` * @param $events * @see \Codeception\Module\Laravel5::dontSeeEventTriggered() */ public function dontSeeEventTriggered($events) { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeEventTriggered', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Opens web page using route name and parameters. * * ``` php * amOnRoute('posts.create'); * ?> * ``` * * @param $routeName * @param array $params * @see \Codeception\Module\Laravel5::amOnRoute() */ public function amOnRoute($routeName, $params = null) { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnRoute', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that current url matches route * * ``` php * seeCurrentRouteIs('posts.index'); * ?> * ``` * @param $routeName * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Module\Laravel5::seeCurrentRouteIs() */ public function canSeeCurrentRouteIs($routeName) { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentRouteIs', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that current url matches route * * ``` php * seeCurrentRouteIs('posts.index'); * ?> * ``` * @param $routeName * @see \Codeception\Module\Laravel5::seeCurrentRouteIs() */ public function seeCurrentRouteIs($routeName) { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentRouteIs', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Opens web page by action name * * ``` php * amOnAction('PostsController@index'); * ?> * ``` * * @param $action * @param array $params * @see \Codeception\Module\Laravel5::amOnAction() */ public function amOnAction($action, $params = null) { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnAction', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that current url matches action * * ``` php * seeCurrentActionIs('PostsController@index'); * ?> * ``` * * @param $action * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Module\Laravel5::seeCurrentActionIs() */ public function canSeeCurrentActionIs($action) { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentActionIs', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that current url matches action * * ``` php * seeCurrentActionIs('PostsController@index'); * ?> * ``` * * @param $action * @see \Codeception\Module\Laravel5::seeCurrentActionIs() */ public function seeCurrentActionIs($action) { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeCurrentActionIs', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that a session variable exists. * * ``` php * seeInSession('key'); * $I->seeInSession('key', 'value'); * ?> * ``` * * @param string|array $key * @param mixed|null $value * @return void * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Module\Laravel5::seeInSession() */ public function canSeeInSession($key, $value = null) { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInSession', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that a session variable exists. * * ``` php * seeInSession('key'); * $I->seeInSession('key', 'value'); * ?> * ``` * * @param string|array $key * @param mixed|null $value * @return void * @see \Codeception\Module\Laravel5::seeInSession() */ public function seeInSession($key, $value = null) { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInSession', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that the session has a given list of values. * * ``` php * seeSessionHasValues(['key1', 'key2']); * $I->seeSessionHasValues(['key1' => 'value1', 'key2' => 'value2']); * ?> * ``` * * @param array $bindings * @return void * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Module\Laravel5::seeSessionHasValues() */ public function canSeeSessionHasValues($bindings) { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeSessionHasValues', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that the session has a given list of values. * * ``` php * seeSessionHasValues(['key1', 'key2']); * $I->seeSessionHasValues(['key1' => 'value1', 'key2' => 'value2']); * ?> * ``` * * @param array $bindings * @return void * @see \Codeception\Module\Laravel5::seeSessionHasValues() */ public function seeSessionHasValues($bindings) { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeSessionHasValues', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that form errors are bound to the View. * * ``` php * seeFormHasErrors(); * ?> * ``` * * @return bool * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Module\Laravel5::seeFormHasErrors() */ public function canSeeFormHasErrors() { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFormHasErrors', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that form errors are bound to the View. * * ``` php * seeFormHasErrors(); * ?> * ``` * * @return bool * @see \Codeception\Module\Laravel5::seeFormHasErrors() */ public function seeFormHasErrors() { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFormHasErrors', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that there are no form errors bound to the View. * * ``` php * dontSeeFormErrors(); * ?> * ``` * * @return bool * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Module\Laravel5::dontSeeFormErrors() */ public function cantSeeFormErrors() { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFormErrors', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that there are no form errors bound to the View. * * ``` php * dontSeeFormErrors(); * ?> * ``` * * @return bool * @see \Codeception\Module\Laravel5::dontSeeFormErrors() */ public function dontSeeFormErrors() { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeFormErrors', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that specific form error messages are set in the view. * * This method calls `seeFormErrorMessage` for each entry in the `$bindings` array. * * ``` php * seeFormErrorMessages([ * 'username' => 'Invalid Username', * 'password' => null, * ]); * ?> * ``` * @param array $bindings * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Module\Laravel5::seeFormErrorMessages() */ public function canSeeFormErrorMessages($bindings) { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFormErrorMessages', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that specific form error messages are set in the view. * * This method calls `seeFormErrorMessage` for each entry in the `$bindings` array. * * ``` php * seeFormErrorMessages([ * 'username' => 'Invalid Username', * 'password' => null, * ]); * ?> * ``` * @param array $bindings * @see \Codeception\Module\Laravel5::seeFormErrorMessages() */ public function seeFormErrorMessages($bindings) { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFormErrorMessages', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that a specific form error message is set in the view. * * If you want to assert that there is a form error message for a specific key * but don't care about the actual error message you can omit `$expectedErrorMessage`. * * If you do pass `$expectedErrorMessage`, this method checks if the actual error message for a key * contains `$expectedErrorMessage`. * * ``` php * seeFormErrorMessage('username'); * $I->seeFormErrorMessage('username', 'Invalid Username'); * ?> * ``` * @param string $key * @param string|null $expectedErrorMessage * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Module\Laravel5::seeFormErrorMessage() */ public function canSeeFormErrorMessage($key, $expectedErrorMessage = null) { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeFormErrorMessage', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Assert that a specific form error message is set in the view. * * If you want to assert that there is a form error message for a specific key * but don't care about the actual error message you can omit `$expectedErrorMessage`. * * If you do pass `$expectedErrorMessage`, this method checks if the actual error message for a key * contains `$expectedErrorMessage`. * * ``` php * seeFormErrorMessage('username'); * $I->seeFormErrorMessage('username', 'Invalid Username'); * ?> * ``` * @param string $key * @param string|null $expectedErrorMessage * @see \Codeception\Module\Laravel5::seeFormErrorMessage() */ public function seeFormErrorMessage($key, $expectedErrorMessage = null) { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeFormErrorMessage', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Set the currently logged in user for the application. * Takes either an object that implements the User interface or * an array of credentials. * * ``` php * amLoggedAs(['username' => 'jane@example.com', 'password' => 'password']); * * // provide User object * $I->amLoggedAs( new User ); * * // can be verified with $I->seeAuthentication(); * ?> * ``` * @param \Illuminate\Contracts\Auth\User|array $user * @param string|null $driver The authentication driver for Laravel <= 5.1.*, guard name for Laravel >= 5.2 * @return void * @see \Codeception\Module\Laravel5::amLoggedAs() */ public function amLoggedAs($user, $driver = null) { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amLoggedAs', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Logout user. * @see \Codeception\Module\Laravel5::logout() */ public function logout() { return $this->getScenario()->runStep(new \Codeception\Step\Action('logout', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that a user is authenticated * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Module\Laravel5::seeAuthentication() */ public function canSeeAuthentication() { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeAuthentication', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that a user is authenticated * @see \Codeception\Module\Laravel5::seeAuthentication() */ public function seeAuthentication() { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeAuthentication', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Check that user is not authenticated * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Module\Laravel5::dontSeeAuthentication() */ public function cantSeeAuthentication() { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeAuthentication', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Check that user is not authenticated * @see \Codeception\Module\Laravel5::dontSeeAuthentication() */ public function dontSeeAuthentication() { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeAuthentication', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Return an instance of a class from the IoC Container. * (http://laravel.com/docs/ioc) * * ``` php * grabService('foo'); * * // Will return an instance of FooBar, also works for singletons. * ?> * ``` * * @param string $class * @return mixed * @see \Codeception\Module\Laravel5::grabService() */ public function grabService($class) { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabService', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Inserts record into the database. * * ``` php * haveRecord('users', array('name' => 'Davert')); * ?> * ``` * * @param $tableName * @param array $attributes * @return mixed * @part orm * @see \Codeception\Module\Laravel5::haveRecord() */ public function haveRecord($tableName, $attributes = null) { return $this->getScenario()->runStep(new \Codeception\Step\Action('haveRecord', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that record exists in database. * * ``` php * seeRecord('users', array('name' => 'davert')); * ?> * ``` * * @param $tableName * @param array $attributes * @part orm * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Module\Laravel5::seeRecord() */ public function canSeeRecord($tableName, $attributes = null) { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeRecord', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that record exists in database. * * ``` php * seeRecord('users', array('name' => 'davert')); * ?> * ``` * * @param $tableName * @param array $attributes * @part orm * @see \Codeception\Module\Laravel5::seeRecord() */ public function seeRecord($tableName, $attributes = null) { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeRecord', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that record does not exist in database. * * ``` php * dontSeeRecord('users', array('name' => 'davert')); * ?> * ``` * * @param $tableName * @param array $attributes * @part orm * Conditional Assertion: Test won't be stopped on fail * @see \Codeception\Module\Laravel5::dontSeeRecord() */ public function cantSeeRecord($tableName, $attributes = null) { return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeRecord', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that record does not exist in database. * * ``` php * dontSeeRecord('users', array('name' => 'davert')); * ?> * ``` * * @param $tableName * @param array $attributes * @part orm * @see \Codeception\Module\Laravel5::dontSeeRecord() */ public function dontSeeRecord($tableName, $attributes = null) { return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeRecord', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Retrieves record from database * * ``` php * grabRecord('users', array('name' => 'davert')); * ?> * ``` * * @param $tableName * @param array $attributes * @return mixed * @part orm * @see \Codeception\Module\Laravel5::grabRecord() */ public function grabRecord($tableName, $attributes = null) { return $this->getScenario()->runStep(new \Codeception\Step\Action('grabRecord', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * * @see \Codeception\Module\Laravel5::haveModel() */ public function haveModel($model, $attributes = null, $name = null, $times = null) { return $this->getScenario()->runStep(new \Codeception\Step\Action('haveModel', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Use Laravel's model factory to create a model. * Can only be used with Laravel 5.1 and later. * * ``` php * createModel('App\User'); * $I->createModel('App\User', ['name' => 'John Doe']); * $I->createModel('App\User', [], 'admin'); * $I->createModel('App\User', [], 'admin', 3); * ?> * ``` * * @see http://laravel.com/docs/5.1/testing#model-factories * @param string $model * @param array $attributes * @param string $name * @param int $times * @return mixed * @see \Codeception\Module\Laravel5::createModel() */ public function createModel($model, $attributes = null, $name = null, $times = null) { return $this->getScenario()->runStep(new \Codeception\Step\Action('createModel', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Use Laravel's model factory to make a model. * Can only be used with Laravel 5.1 and later. * * ``` php * makeModel('App\User'); * $I->makeModel('App\User', ['name' => 'John Doe']); * $I->makeModel('App\User', [], 'admin'); * $I->makeModel('App\User', [], 'admin', 3); * ?> * ``` * * @see http://laravel.com/docs/5.1/testing#model-factories * @param string $model * @param array $attributes * @param string $name * @param int $times * @return mixed * @see \Codeception\Module\Laravel5::makeModel() */ public function makeModel($model, $attributes = null, $name = null, $times = null) { return $this->getScenario()->runStep(new \Codeception\Step\Action('makeModel', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Authenticates user for HTTP_AUTH * * @param $username * @param $password * @see \Codeception\Lib\InnerBrowser::amHttpAuthenticated() */ public function amHttpAuthenticated($username, $password) { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Opens the page for the given relative URI. * * ``` php * amOnPage('/'); * // opens /register page * $I->amOnPage('/register'); * ``` * * @param $page * @see \Codeception\Lib\InnerBrowser::amOnPage() */ public function amOnPage($page) { return $this->getScenario()->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Perform a click on a link or a button, given by a locator. * If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string. * For buttons, the "value" attribute, "name" attribute, and inner text are searched. * For links, the link text is searched. * For images, the "alt" attribute and inner text of any parent links are searched. * * The second parameter is a context (CSS or XPath locator) to narrow the search. * * Note that if the locator matches a button of type `submit`, the form will be submitted. * * ``` php * click('Logout'); * // button of form * $I->click('Submit'); * // CSS button * $I->click('#form input[type=submit]'); * // XPath * $I->click('//form/*[@type=submit]'); * // link in context * $I->click('Logout', '#nav'); * // using strict locator * $I->click(['link' => 'Login']); * ?> * ``` * * @param $link * @param $context * @see \Codeception\Lib\InnerBrowser::click() */ public function click($link, $context = null) { return $this->getScenario()->runStep(new \Codeception\Step\Action('click', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * * Checks that the current page contains the given string (case insensitive). * * You can specify a specific HTML element (via CSS or XPath) as the second * parameter to only search within that element. * * ``` php * see('Logout'); // I can suppose user is logged in * $I->see('Sign Up', 'h1'); // I can suppose it's a signup page * $I->see('Sign Up', '//body/h1'); // with XPath * ``` * * Note that the search is done after stripping all HTML tags from the body, * so `$I->see('strong')` will return true for strings like: * * - `
I am Stronger than thou
` * - `` * * But will *not* be true for strings like: * * - `Home` * - `I am Stronger than thou
` * - `` * * But will *not* be true for strings like: * * - `Home` * - `I am Stronger than thou
` * - `` * * But will ignore strings like: * * - `Home` * - `I am Stronger than thou
` * - `` * * But will ignore strings like: * * - `Home` * - `