Home`
* - ``
- *
+ *
* For checking the raw source code, use `seeInSource()`.
*
* @param $text
@@ -335,19 +348,19 @@ trait FunctionalTesterActions
* $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page
* $I->dontSee('Sign Up','//body/h1'); // with XPath
* ```
- *
+ *
* Note that the search is done after stripping all HTML tags from the body,
* so `$I->dontSee('strong')` will fail on strings like:
- *
+ *
* - `
`
* - ``
- *
+ *
* But will ignore strings like:
- *
+ *
* - `
Home`
* - ``
- *
+ *
* For checking the raw source code, use `seeInSource()`.
*
* @param $text
@@ -969,7 +982,7 @@ trait FunctionalTesterActions
*
* Checks if the array of form parameters (name => value) are set on the form matched with the
* passed selector.
- *
+ *
* ``` php
* seeInFormFields('form[name=myform]', [
@@ -978,10 +991,10 @@ trait FunctionalTesterActions
* ]);
* ?>
* ```
- *
+ *
* For multi-select elements, or to check values of multiple elements with the same name, an
* array may be passed:
- *
+ *
* ``` php
* seeInFormFields('.form-class', [
@@ -998,7 +1011,7 @@ trait FunctionalTesterActions
* ```
*
* Additionally, checkbox values can be checked with a boolean.
- *
+ *
* ``` php
* seeInFormFields('#form-id', [
@@ -1007,9 +1020,9 @@ trait FunctionalTesterActions
* ]);
* ?>
* ```
- *
+ *
* Pair this with submitForm for quick testing magic.
- *
+ *
* ``` php
* seeInFormFields('//form[@id=my-form]', $form);
* ?>
* ```
- *
+ *
* @param $formSelector
* @param $params
* Conditional Assertion: Test won't be stopped on fail
@@ -1037,7 +1050,7 @@ trait FunctionalTesterActions
*
* Checks if the array of form parameters (name => value) are set on the form matched with the
* passed selector.
- *
+ *
* ``` php
* seeInFormFields('form[name=myform]', [
@@ -1046,10 +1059,10 @@ trait FunctionalTesterActions
* ]);
* ?>
* ```
- *
+ *
* For multi-select elements, or to check values of multiple elements with the same name, an
* array may be passed:
- *
+ *
* ``` php
* seeInFormFields('.form-class', [
@@ -1066,7 +1079,7 @@ trait FunctionalTesterActions
* ```
*
* Additionally, checkbox values can be checked with a boolean.
- *
+ *
* ``` php
* seeInFormFields('#form-id', [
@@ -1075,9 +1088,9 @@ trait FunctionalTesterActions
* ]);
* ?>
* ```
- *
+ *
* Pair this with submitForm for quick testing magic.
- *
+ *
* ``` php
* seeInFormFields('//form[@id=my-form]', $form);
* ?>
* ```
- *
+ *
* @param $formSelector
* @param $params
* @see \Codeception\Lib\InnerBrowser::seeInFormFields()
@@ -1106,7 +1119,7 @@ trait FunctionalTesterActions
*
* Checks if the array of form parameters (name => value) are not set on the form matched with
* the passed selector.
- *
+ *
* ``` php
* dontSeeInFormFields('form[name=myform]', [
@@ -1115,10 +1128,10 @@ trait FunctionalTesterActions
* ]);
* ?>
* ```
- *
+ *
* To check that an element hasn't been assigned any one of many values, an array can be passed
* as the value:
- *
+ *
* ``` php
* dontSeeInFormFields('.form-class', [
@@ -1131,7 +1144,7 @@ trait FunctionalTesterActions
* ```
*
* Additionally, checkbox values can be checked with a boolean.
- *
+ *
* ``` php
* dontSeeInFormFields('#form-id', [
@@ -1140,7 +1153,7 @@ trait FunctionalTesterActions
* ]);
* ?>
* ```
- *
+ *
* @param $formSelector
* @param $params
* Conditional Assertion: Test won't be stopped on fail
@@ -1154,7 +1167,7 @@ trait FunctionalTesterActions
*
* Checks if the array of form parameters (name => value) are not set on the form matched with
* the passed selector.
- *
+ *
* ``` php
* dontSeeInFormFields('form[name=myform]', [
@@ -1163,10 +1176,10 @@ trait FunctionalTesterActions
* ]);
* ?>
* ```
- *
+ *
* To check that an element hasn't been assigned any one of many values, an array can be passed
* as the value:
- *
+ *
* ``` php
* dontSeeInFormFields('.form-class', [
@@ -1179,7 +1192,7 @@ trait FunctionalTesterActions
* ```
*
* Additionally, checkbox values can be checked with a boolean.
- *
+ *
* ``` php
* dontSeeInFormFields('#form-id', [
@@ -1188,7 +1201,7 @@ trait FunctionalTesterActions
* ]);
* ?>
* ```
- *
+ *
* @param $formSelector
* @param $params
* @see \Codeception\Lib\InnerBrowser::dontSeeInFormFields()
@@ -1205,18 +1218,18 @@ trait FunctionalTesterActions
* values. Pass the form field's values as an array in the second
* parameter.
*
- * Although this function can be used as a short-hand version of
- * `fillField()`, `selectOption()`, `click()` etc. it has some important
+ * Although this function can be used as a short-hand version of
+ * `fillField()`, `selectOption()`, `click()` etc. it has some important
* differences:
- *
+ *
* * Only field *names* may be used, not CSS/XPath selectors nor field labels
* * If a field is sent to this function that does *not* exist on the page,
* it will silently be added to the HTTP request. This is helpful for testing
* some types of forms, but be aware that you will *not* get an exception
* like you would if you called `fillField()` or `selectOption()` with
* a missing field.
- *
- * Fields that are not provided will be filled by their values from the page,
+ *
+ * Fields that are not provided will be filled by their values from the page,
* or from any previous calls to `fillField()`, `selectOption()` etc.
* You don't need to click the 'Submit' button afterwards.
* This command itself triggers the request to form's action.
@@ -1279,10 +1292,10 @@ trait FunctionalTesterActions
* ```
* Note that "2" will be the submitted value for the "plan" field, as it is
* the selected option.
- *
+ *
* You can also emulate a JavaScript submission by not specifying any
* buttons in the third parameter to submitForm.
- *
+ *
* ```php
* submitForm(
@@ -1296,10 +1309,10 @@ trait FunctionalTesterActions
* ]
* );
* ```
- *
- * This function works well when paired with `seeInFormFields()`
+ *
+ * This function works well when paired with `seeInFormFields()`
* for quickly testing CRUD interfaces and form validation logic.
- *
+ *
* ``` php
* 'another value', // 'field[]' is already a defined key
* ]);
* ```
- *
+ *
* The solution is to pass an array value:
- *
+ *
* ```php
*
* ```
*
+ * Or provide an associative array for the second argument to specifically define which selection method should be used:
+ *
+ * ``` php
+ * selectOption('Which OS do you use?', array('text' => 'Windows')); // Only search by text 'Windows'
+ * $I->selectOption('Which OS do you use?', array('value' => 'windows')); // Only search by value 'windows'
+ * ?>
+ + ```
+ *
* @param $select
* @param $option
* @see \Codeception\Lib\InnerBrowser::selectOption()
@@ -1562,7 +1584,8 @@ trait FunctionalTesterActions
* [!] Method is generated. Documentation taken from corresponding module.
*
* Finds and returns the text contents of the given element.
- * If a fuzzy locator is used, the element is found using CSS, XPath, and by matching the full page source by regular expression.
+ * If a fuzzy locator is used, the element is found using CSS, XPath,
+ * and by matching the full page source by regular expression.
*
* ``` php
* First
*
Second
*
Third
* ```
- *
+ *
* ```php
* grabMultiple('a');
- *
+ *
* // would return ['#first', '#second', '#third']
* $aLinks = $I->grabMultiple('a', 'href');
* ?>
* ```
- *
+ *
* @param $cssOrXpath
* @param $attribute
* @return string[]
@@ -2042,9 +2065,15 @@ trait FunctionalTesterActions
*
* Checks that response code is equal to value provided.
*
- * @param $code
+ * ```php
+ * seeResponseCodeIs(200);
*
- * @return mixed
+ * // recommended \Codeception\Util\HttpCode
+ * $I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK);
+ * ```
+ *
+ * @param $code
* Conditional Assertion: Test won't be stopped on fail
* @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()
*/
@@ -2056,9 +2085,15 @@ trait FunctionalTesterActions
*
* Checks that response code is equal to value provided.
*
- * @param $code
+ * ```php
+ * seeResponseCodeIs(200);
*
- * @return mixed
+ * // recommended \Codeception\Util\HttpCode
+ * $I->seeResponseCodeIs(\Codeception\Util\HttpCode::OK);
+ * ```
+ *
+ * @param $code
* @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()
*/
public function seeResponseCodeIs($code) {
@@ -2066,6 +2101,45 @@ trait FunctionalTesterActions
}
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that response code is equal to value provided.
+ *
+ * ```php
+ * dontSeeResponseCodeIs(200);
+ *
+ * // recommended \Codeception\Util\HttpCode
+ * $I->dontSeeResponseCodeIs(\Codeception\Util\HttpCode::OK);
+ * ```
+ * @param $code
+ * Conditional Assertion: Test won't be stopped on fail
+ * @see \Codeception\Lib\InnerBrowser::dontSeeResponseCodeIs()
+ */
+ public function cantSeeResponseCodeIs($code) {
+ return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeResponseCodeIs', func_get_args()));
+ }
+ /**
+ * [!] Method is generated. Documentation taken from corresponding module.
+ *
+ * Checks that response code is equal to value provided.
+ *
+ * ```php
+ * dontSeeResponseCodeIs(200);
+ *
+ * // recommended \Codeception\Util\HttpCode
+ * $I->dontSeeResponseCodeIs(\Codeception\Util\HttpCode::OK);
+ * ```
+ * @param $code
+ * @see \Codeception\Lib\InnerBrowser::dontSeeResponseCodeIs()
+ */
+ public function dontSeeResponseCodeIs($code) {
+ return $this->getScenario()->runStep(new \Codeception\Step\Assertion('dontSeeResponseCodeIs', func_get_args()));
+ }
+
+
/**
* [!] Method is generated. Documentation taken from corresponding module.
*
@@ -2164,863 +2238,11 @@ trait FunctionalTesterActions
* [!] Method is generated. Documentation taken from corresponding module.
*
* Moves back in history.
- *
+ *
* @param int $numberOfSteps (default value 1)
* @see \Codeception\Lib\InnerBrowser::moveBack()
*/
public function moveBack($numberOfSteps = null) {
return $this->getScenario()->runStep(new \Codeception\Step\Action('moveBack', func_get_args()));
}
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Provides access the Laravel application object.
- *
- * @return \Illuminate\Foundation\Application
- * @see \Codeception\Module\Laravel5::getApplication()
- */
- public function getApplication() {
- return $this->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.
- *
- * Enable Laravel exception handling.
- *
- * ``` php
- * enableExceptionHandling();
- * ?>
- * ```
- * @see \Codeception\Module\Laravel5::enableExceptionHandling()
- */
- public function enableExceptionHandling() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('enableExceptionHandling', func_get_args()));
- }
-
-
- /**
- * [!] Method is generated. Documentation taken from corresponding module.
- *
- * Disable Laravel exception handling.
- *
- * ``` php
- * disableExceptionHandling();
- * ?>
- * ```
- * @see \Codeception\Module\Laravel5::disableExceptionHandling()
- */
- public function disableExceptionHandling() {
- return $this->getScenario()->runStep(new \Codeception\Step\Action('disableExceptionHandling', 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.
- * You can specify the guard that should be use for Laravel >= 5.2.
- * @param string|null $guard
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\Laravel5::seeAuthentication()
- */
- public function canSeeAuthentication($guard = null) {
- 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.
- * You can specify the guard that should be use for Laravel >= 5.2.
- * @param string|null $guard
- * @see \Codeception\Module\Laravel5::seeAuthentication()
- */
- public function seeAuthentication($guard = null) {
- 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.
- * You can specify the guard that should be use for Laravel >= 5.2.
- * @param string|null $guard
- * Conditional Assertion: Test won't be stopped on fail
- * @see \Codeception\Module\Laravel5::dontSeeAuthentication()
- */
- public function cantSeeAuthentication($guard = null) {
- 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.
- * You can specify the guard that should be use for Laravel >= 5.2.
- * @param string|null $guard
- * @see \Codeception\Module\Laravel5::dontSeeAuthentication()
- */
- public function dontSeeAuthentication($guard = null) {
- 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()));
- }
}
diff --git a/tests/acceptance/AllPagesCept.php b/tests/acceptance/AllPagesCept.php
index 0ff3ee9fa63e..1daea5ad7284 100644
--- a/tests/acceptance/AllPagesCept.php
+++ b/tests/acceptance/AllPagesCept.php
@@ -5,6 +5,14 @@ $I->checkIfLogin($I);
$I->wantTo('Test all pages load');
+// Check all language files
+$count = $I->grabNumRecords('languages');
+for ($i=1; $i<=$count; $i++) {
+ $locale = $I->grabFromDatabase('languages', 'locale', ['id' => $i]);
+ $I->amOnPage("/dashboard?lang={$locale}");
+ $I->seeElement('.navbar-brand');
+}
+
// Top level navigation
$I->amOnPage('/dashboard');
$I->see('Total Revenue');
diff --git a/tests/functional.suite.yml b/tests/functional.suite.yml
index b89e2023daba..9efc75988269 100644
--- a/tests/functional.suite.yml
+++ b/tests/functional.suite.yml
@@ -14,4 +14,4 @@ modules:
CURLOPT_RETURNTRANSFER: true
- Laravel5:
environment_file: '.env'
- cleanup: false
\ No newline at end of file
+ cleanup: false