Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Installed codeception.
James Cole1f7c98bdcf96
diff --git a/.gitignore b/.gitignoreindex a6133503cd..50a4392b46 100644--- a/.gitignore+++ b/.gitignore@@ -14,3 +14,5 @@ index.html*app/storage/firefly-export*.vagrantfirefly-iii-import-*.json++tests/_output/*\ No newline at end of filediff --git a/codeception.yml b/codeception.ymlnew file mode 100644index 0000000000..306e739692--- /dev/null+++ b/codeception.yml@@ -0,0 +1,17 @@+actor: Tester+paths:+ tests: tests+ log: tests/_output+ data: tests/_data+ helpers: tests/_support+settings:+ bootstrap: _bootstrap.php+ colors: true+ memory_limit: 1024M+modules:+ config:+ Db:+ dsn: ''+ user: ''+ password: ''+ dump: tests/_data/dump.sqldiff --git a/composer.json b/composer.jsonindex 94ebfb25d6..7bf727447a 100644--- a/composer.json+++ b/composer.json@@ -32,7 +32,9 @@"doctrine/dbal": "~2.3","satooshi/php-coveralls": "dev-master","mockery/mockery": "@stable",- "league/factory-muffin": "~2.0"+ "league/factory-muffin": "~2.0",+ "codeception/codeception": "*"+},"autoload": {"classmap": [diff --git a/tests/_bootstrap.php b/tests/_bootstrap.phpnew file mode 100644index 0000000000..243f9c85bc--- /dev/null+++ b/tests/_bootstrap.php@@ -0,0 +1,2 @@+<?php+// This is global bootstrap for autoloadingdiff --git a/tests/_data/dump.sql b/tests/_data/dump.sqlnew file mode 100644index 0000000000..4bc742ce67--- /dev/null+++ b/tests/_data/dump.sql@@ -0,0 +1 @@+/* Replace this file with actual dump of your database */\ No newline at end of filediff --git a/tests/_support/AcceptanceHelper.php b/tests/_support/AcceptanceHelper.phpnew file mode 100644index 0000000000..d09c6e4b18--- /dev/null+++ b/tests/_support/AcceptanceHelper.php@@ -0,0 +1,10 @@+<?php+namespace Codeception\Module;++// here you can define custom actions+// all public methods declared in helper class will be available in $I++class AcceptanceHelper extends \Codeception\Module+{++}diff --git a/tests/_support/FunctionalHelper.php b/tests/_support/FunctionalHelper.phpnew file mode 100644index 0000000000..22cc714277--- /dev/null+++ b/tests/_support/FunctionalHelper.php@@ -0,0 +1,10 @@+<?php+namespace Codeception\Module;++// here you can define custom actions+// all public methods declared in helper class will be available in $I++class FunctionalHelper extends \Codeception\Module+{++}diff --git a/tests/_support/UnitHelper.php b/tests/_support/UnitHelper.phpnew file mode 100644index 0000000000..dcbc192e2b--- /dev/null+++ b/tests/_support/UnitHelper.php@@ -0,0 +1,10 @@+<?php+namespace Codeception\Module;++// here you can define custom actions+// all public methods declared in helper class will be available in $I++class UnitHelper extends \Codeception\Module+{++}diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.ymlnew file mode 100644index 0000000000..8a84881eb9--- /dev/null+++ b/tests/acceptance.suite.yml@@ -0,0 +1,14 @@+# Codeception Test Suite Configuration++# suite for acceptance tests.+# perform tests in browser using the WebDriver or PhpBrowser.+# If you need both WebDriver and PHPBrowser tests - create a separate suite.++class_name: AcceptanceTester+modules:+ enabled:+ - PhpBrowser+ - AcceptanceHelper+ config:+ PhpBrowser:+ url: 'http://localhost/myapp/'diff --git a/tests/acceptance/AcceptanceTester.php b/tests/acceptance/AcceptanceTester.phpnew file mode 100644index 0000000000..71ce98c09a--- /dev/null+++ b/tests/acceptance/AcceptanceTester.php@@ -0,0 +1,1620 @@+<?php //[STAMP] 6d8b4518def1c0712832bc07010a0f73++// This class was automatically generated by build task+// You should not change it manually as it will be overwritten on next build+// @codingStandardsIgnoreFile+++use Codeception\Module\PhpBrowser;+use Codeception\Module\AcceptanceHelper;++/**+ * Inherited Methods+ * @method void wantToTest($text)+ * @method void wantTo($text)+ * @method void execute($callable)+ * @method void expectTo($prediction)+ * @method void expect($prediction)+ * @method void amGoingTo($argumentation)+ * @method void am($role)+ * @method void lookForwardTo($achieveValue)+ * @method void comment($description)+ * @method void haveFriend($name, $actorClass = null)+*/+class AcceptanceTester extends \Codeception\Actor+{++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ *+ * @see \Codeception\Module\PhpBrowser::setHeader()+ */+ public function setHeader($header, $value) {+ return $this->scenario->runStep(new \Codeception\Step\Action('setHeader', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Authenticates user for HTTP_AUTH+ *+ * @param $username+ * @param $password+ * @see \Codeception\Module\PhpBrowser::amHttpAuthenticated()+ */+ public function amHttpAuthenticated($username, $password) {+ return $this->scenario->runStep(new \Codeception\Step\Condition('amHttpAuthenticated', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Open web page at absolute URL.+ * Base url will be reconfigured to use the host of provided Url.+ *+ * ``` php+ * <?php+ * $I->amOnUrl('http://codeception.com');+ * $I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart+ * ?>+ * ```+ * @see \Codeception\Module\PhpBrowser::amOnUrl()+ */+ public function amOnUrl($url) {+ return $this->scenario->runStep(new \Codeception\Step\Condition('amOnUrl', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Sets 'url' configuration parameter to hosts subdomain.+ * It does not open a page on subdomain. Use `amOnPage` for that+ *+ * ``` php+ * <?php+ * // If config is: 'http://mysite.com'+ * // or config is: 'http://www.mysite.com'+ * // or config is: 'http://company.mysite.com'+ *+ * $I->amOnSubdomain('user');+ * $I->amOnPage('/');+ * // moves to http://user.mysite.com/+ * ?>+ * ```+ *+ * @param $subdomain+ *+ * @return mixed+ * @see \Codeception\Module\PhpBrowser::amOnSubdomain()+ */+ public function amOnSubdomain($subdomain) {+ return $this->scenario->runStep(new \Codeception\Step\Condition('amOnSubdomain', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Low-level API method.+ * If Codeception commands are not enough, use [Guzzle HTTP Client](http://guzzlephp.org/) methods directly+ *+ * Example:+ *+ * ``` php+ * <?php+ * $I->executeInGuzzle(function (\GuzzleHttp\Client $client) {+ * $client->get('/get', ['query' => ['foo' => 'bar']]);+ * });+ * ?>+ * ```+ *+ * It is not recommended to use this command on a regular basis.+ * If Codeception lacks important Guzzle Client methods, implement them and submit patches.+ *+ * @param callable $function+ * @see \Codeception\Module\PhpBrowser::executeInGuzzle()+ */+ public function executeInGuzzle($function) {+ return $this->scenario->runStep(new \Codeception\Step\Action('executeInGuzzle', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Opens the page.+ * Requires relative uri as parameter+ *+ * Example:+ *+ * ``` php+ * <?php+ * // opens front page+ * $I->amOnPage('/');+ * // opens /register page+ * $I->amOnPage('/register');+ * ?>+ * ```+ *+ * @param $page+ * @see \Codeception\Lib\InnerBrowser::amOnPage()+ */+ public function amOnPage($page) {+ return $this->scenario->runStep(new \Codeception\Step\Condition('amOnPage', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Perform a click on link or button.+ * Link or button are found by their names or CSS selector.+ * Submits a form if button is a submit type.+ *+ * If link is an image it's found by alt attribute value of image.+ * If button is image button is found by it's value+ * If link or button can't be found by name they are searched by CSS selector.+ *+ * The second parameter is a context: CSS or XPath locator to narrow the search.+ *+ * Examples:+ *+ * ``` php+ * <?php+ * // simple link+ * $I->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->scenario->runStep(new \Codeception\Step\Action('click', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Check if current page contains the text specified.+ * Specify the css selector to match only specific region.+ *+ * Examples:+ *+ * ``` php+ * <?php+ * $I->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+ * ?>+ * ```+ *+ * @param $text+ * @param null $selector+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::see()+ */+ public function canSee($text, $selector = null) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('see', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Check if current page contains the text specified.+ * Specify the css selector to match only specific region.+ *+ * Examples:+ *+ * ``` php+ * <?php+ * $I->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+ * ?>+ * ```+ *+ * @param $text+ * @param null $selector+ * @see \Codeception\Lib\InnerBrowser::see()+ */+ public function see($text, $selector = null) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('see', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Check if current page doesn't contain the text specified.+ * Specify the css selector to match only specific region.+ *+ * Examples:+ *+ * ```php+ * <?php+ * $I->dontSee('Login'); // I can suppose user is already logged in+ * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page+ * $I->dontSee('Sign Up','//body/h1'); // with XPath+ * ?>+ * ```+ *+ * @param $text+ * @param null $selector+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::dontSee()+ */+ public function cantSee($text, $selector = null) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSee', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Check if current page doesn't contain the text specified.+ * Specify the css selector to match only specific region.+ *+ * Examples:+ *+ * ```php+ * <?php+ * $I->dontSee('Login'); // I can suppose user is already logged in+ * $I->dontSee('Sign Up','h1'); // I can suppose it's not a signup page+ * $I->dontSee('Sign Up','//body/h1'); // with XPath+ * ?>+ * ```+ *+ * @param $text+ * @param null $selector+ * @see \Codeception\Lib\InnerBrowser::dontSee()+ */+ public function dontSee($text, $selector = null) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSee', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if there is a link with text specified.+ * Specify url to match link with exact this url.+ *+ * Examples:+ *+ * ``` php+ * <?php+ * $I->seeLink('Logout'); // matches <a href="#">Logout</a>+ * $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>+ * ?>+ * ```+ *+ * @param $text+ * @param null $url+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::seeLink()+ */+ public function canSeeLink($text, $url = null) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeLink', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if there is a link with text specified.+ * Specify url to match link with exact this url.+ *+ * Examples:+ *+ * ``` php+ * <?php+ * $I->seeLink('Logout'); // matches <a href="#">Logout</a>+ * $I->seeLink('Logout','/logout'); // matches <a href="/logout">Logout</a>+ * ?>+ * ```+ *+ * @param $text+ * @param null $url+ * @see \Codeception\Lib\InnerBrowser::seeLink()+ */+ public function seeLink($text, $url = null) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seeLink', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if page doesn't contain the link with text specified.+ * Specify url to narrow the results.+ *+ * Examples:+ *+ * ``` php+ * <?php+ * $I->dontSeeLink('Logout'); // I suppose user is not logged in+ * ?>+ * ```+ *+ * @param $text+ * @param null $url+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::dontSeeLink()+ */+ public function cantSeeLink($text, $url = null) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeLink', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if page doesn't contain the link with text specified.+ * Specify url to narrow the results.+ *+ * Examples:+ *+ * ``` php+ * <?php+ * $I->dontSeeLink('Logout'); // I suppose user is not logged in+ * ?>+ * ```+ *+ * @param $text+ * @param null $url+ * @see \Codeception\Lib\InnerBrowser::dontSeeLink()+ */+ public function dontSeeLink($text, $url = null) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeLink', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that current uri contains a value+ *+ * ``` php+ * <?php+ * // to match: /home/dashboard+ * $I->seeInCurrentUrl('home');+ * // to match: /users/1+ * $I->seeInCurrentUrl('/users/');+ * ?>+ * ```+ *+ * @param $uri+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl()+ */+ public function canSeeInCurrentUrl($uri) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInCurrentUrl', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that current uri contains a value+ *+ * ``` php+ * <?php+ * // to match: /home/dashboard+ * $I->seeInCurrentUrl('home');+ * // to match: /users/1+ * $I->seeInCurrentUrl('/users/');+ * ?>+ * ```+ *+ * @param $uri+ * @see \Codeception\Lib\InnerBrowser::seeInCurrentUrl()+ */+ public function seeInCurrentUrl($uri) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInCurrentUrl', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that current uri does not contain a value+ *+ * ``` php+ * <?php+ * $I->dontSeeInCurrentUrl('/users/');+ * ?>+ * ```+ *+ * @param $uri+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()+ */+ public function cantSeeInCurrentUrl($uri) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInCurrentUrl', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that current uri does not contain a value+ *+ * ``` php+ * <?php+ * $I->dontSeeInCurrentUrl('/users/');+ * ?>+ * ```+ *+ * @param $uri+ * @see \Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()+ */+ public function dontSeeInCurrentUrl($uri) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInCurrentUrl', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that current url is equal to value.+ * Unlike `seeInCurrentUrl` performs a strict check.+ *+ * ``` php+ * <?php+ * // to match root url+ * $I->seeCurrentUrlEquals('/');+ * ?>+ * ```+ *+ * @param $uri+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()+ */+ public function canSeeCurrentUrlEquals($uri) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlEquals', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that current url is equal to value.+ * Unlike `seeInCurrentUrl` performs a strict check.+ *+ * ``` php+ * <?php+ * // to match root url+ * $I->seeCurrentUrlEquals('/');+ * ?>+ * ```+ *+ * @param $uri+ * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()+ */+ public function seeCurrentUrlEquals($uri) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCurrentUrlEquals', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that current url is not equal to value.+ * Unlike `dontSeeInCurrentUrl` performs a strict check.+ *+ * ``` php+ * <?php+ * // current url is not root+ * $I->dontSeeCurrentUrlEquals('/');+ * ?>+ * ```+ *+ * @param $uri+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()+ */+ public function cantSeeCurrentUrlEquals($uri) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlEquals', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that current url is not equal to value.+ * Unlike `dontSeeInCurrentUrl` performs a strict check.+ *+ * ``` php+ * <?php+ * // current url is not root+ * $I->dontSeeCurrentUrlEquals('/');+ * ?>+ * ```+ *+ * @param $uri+ * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()+ */+ public function dontSeeCurrentUrlEquals($uri) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlEquals', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that current url is matches a RegEx value+ *+ * ``` php+ * <?php+ * // to match root url+ * $I->seeCurrentUrlMatches('~$/users/(\d+)~');+ * ?>+ * ```+ *+ * @param $uri+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()+ */+ public function canSeeCurrentUrlMatches($uri) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCurrentUrlMatches', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that current url is matches a RegEx value+ *+ * ``` php+ * <?php+ * // to match root url+ * $I->seeCurrentUrlMatches('~$/users/(\d+)~');+ * ?>+ * ```+ *+ * @param $uri+ * @see \Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()+ */+ public function seeCurrentUrlMatches($uri) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCurrentUrlMatches', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that current url does not match a RegEx value+ *+ * ``` php+ * <?php+ * // to match root url+ * $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');+ * ?>+ * ```+ *+ * @param $uri+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()+ */+ public function cantSeeCurrentUrlMatches($uri) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCurrentUrlMatches', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that current url does not match a RegEx value+ *+ * ``` php+ * <?php+ * // to match root url+ * $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');+ * ?>+ * ```+ *+ * @param $uri+ * @see \Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()+ */+ public function dontSeeCurrentUrlMatches($uri) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCurrentUrlMatches', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Takes a parameters from current URI by RegEx.+ * If no url provided returns full URI.+ *+ * ``` php+ * <?php+ * $user_id = $I->grabFromCurrentUrl('~$/user/(\d+)/~');+ * $uri = $I->grabFromCurrentUrl();+ * ?>+ * ```+ *+ * @param null $uri+ *+ * @internal param $url+ * @return mixed+ * @see \Codeception\Lib\InnerBrowser::grabFromCurrentUrl()+ */+ public function grabFromCurrentUrl($uri = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('grabFromCurrentUrl', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Assert if the specified checkbox is checked.+ * Use css selector or xpath to match.+ *+ * Example:+ *+ * ``` php+ * <?php+ * $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms+ * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.+ * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');+ * ?>+ * ```+ *+ * @param $checkbox+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()+ */+ public function canSeeCheckboxIsChecked($checkbox) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCheckboxIsChecked', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Assert if the specified checkbox is checked.+ * Use css selector or xpath to match.+ *+ * Example:+ *+ * ``` php+ * <?php+ * $I->seeCheckboxIsChecked('#agree'); // I suppose user agreed to terms+ * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user agreed to terms, If there is only one checkbox in form.+ * $I->seeCheckboxIsChecked('//form/input[@type=checkbox and @name=agree]');+ * ?>+ * ```+ *+ * @param $checkbox+ * @see \Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()+ */+ public function seeCheckboxIsChecked($checkbox) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCheckboxIsChecked', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Assert if the specified checkbox is unchecked.+ * Use css selector or xpath to match.+ *+ * Example:+ *+ * ``` php+ * <?php+ * $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms+ * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.+ * ?>+ * ```+ *+ * @param $checkbox+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()+ */+ public function cantSeeCheckboxIsChecked($checkbox) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCheckboxIsChecked', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Assert if the specified checkbox is unchecked.+ * Use css selector or xpath to match.+ *+ * Example:+ *+ * ``` php+ * <?php+ * $I->dontSeeCheckboxIsChecked('#agree'); // I suppose user didn't agree to terms+ * $I->seeCheckboxIsChecked('#signup_form input[type=checkbox]'); // I suppose user didn't check the first checkbox in form.+ * ?>+ * ```+ *+ * @param $checkbox+ * @see \Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()+ */+ public function dontSeeCheckboxIsChecked($checkbox) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCheckboxIsChecked', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that an input field or textarea contains value.+ * Field is matched either by label or CSS or Xpath+ *+ * Example:+ *+ * ``` php+ * <?php+ * $I->seeInField('Body','Type your comment here');+ * $I->seeInField('form textarea[name=body]','Type your comment here');+ * $I->seeInField('form input[type=hidden]','hidden_value');+ * $I->seeInField('#searchform input','Search');+ * $I->seeInField('//form/*[@name=search]','Search');+ * $I->seeInField(['name' => 'search'], 'Search');+ * ?>+ * ```+ *+ * @param $field+ * @param $value+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::seeInField()+ */+ public function canSeeInField($field, $value) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInField', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that an input field or textarea contains value.+ * Field is matched either by label or CSS or Xpath+ *+ * Example:+ *+ * ``` php+ * <?php+ * $I->seeInField('Body','Type your comment here');+ * $I->seeInField('form textarea[name=body]','Type your comment here');+ * $I->seeInField('form input[type=hidden]','hidden_value');+ * $I->seeInField('#searchform input','Search');+ * $I->seeInField('//form/*[@name=search]','Search');+ * $I->seeInField(['name' => 'search'], 'Search');+ * ?>+ * ```+ *+ * @param $field+ * @param $value+ * @see \Codeception\Lib\InnerBrowser::seeInField()+ */+ public function seeInField($field, $value) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInField', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that an input field or textarea doesn't contain value.+ * Field is matched either by label or CSS or Xpath+ * Example:+ *+ * ``` php+ * <?php+ * $I->dontSeeInField('Body','Type your comment here');+ * $I->dontSeeInField('form textarea[name=body]','Type your comment here');+ * $I->dontSeeInField('form input[type=hidden]','hidden_value');+ * $I->dontSeeInField('#searchform input','Search');+ * $I->dontSeeInField('//form/*[@name=search]','Search');+ * $I->seeInField(['name' => 'search'], 'Search');+ * ?>+ * ```+ *+ * @param $field+ * @param $value+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::dontSeeInField()+ */+ public function cantSeeInField($field, $value) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInField', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that an input field or textarea doesn't contain value.+ * Field is matched either by label or CSS or Xpath+ * Example:+ *+ * ``` php+ * <?php+ * $I->dontSeeInField('Body','Type your comment here');+ * $I->dontSeeInField('form textarea[name=body]','Type your comment here');+ * $I->dontSeeInField('form input[type=hidden]','hidden_value');+ * $I->dontSeeInField('#searchform input','Search');+ * $I->dontSeeInField('//form/*[@name=search]','Search');+ * $I->seeInField(['name' => 'search'], 'Search');+ * ?>+ * ```+ *+ * @param $field+ * @param $value+ * @see \Codeception\Lib\InnerBrowser::dontSeeInField()+ */+ public function dontSeeInField($field, $value) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInField', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Submits a form located on page.+ * Specify the form by it's css or xpath selector.+ * Fill the form fields values as array.+ *+ * Skipped fields will be filled by their values from page.+ * You don't need to click the 'Submit' button afterwards.+ * This command itself triggers the request to form's action.+ *+ * You can optionally specify what button's value to include+ * in the request with the last parameter as an alternative to+ * explicitly setting its value in the second parameter, as+ * button values are not otherwise included in the request.+ *+ * Examples:+ *+ * ``` php+ * <?php+ * $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'));+ * // or+ * $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'), 'submitButtonName');+ *+ * ```+ *+ * For a sample Sign Up form:+ *+ * ``` html+ * <form action="/sign_up">+ * Login: <input type="text" name="user[login]" /><br/>+ * Password: <input type="password" name="user[password]" /><br/>+ * Do you agree to out terms? <input type="checkbox" name="user[agree]" /><br/>+ * Select pricing plan <select name="plan"><option value="1">Free</option><option value="2" selected="selected">Paid</option></select>+ * <input type="submit" name="submitButton" value="Submit" />+ * </form>+ * ```+ * You could write the following to submit it:+ *+ * ``` php+ * <?php+ * $I->submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true)), 'submitButton');+ *+ * ```+ * 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+ * <?php+ * $I->submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true)));+ *+ * ```+ *+ * @param $selector+ * @param $params+ * @param $button+ * @see \Codeception\Lib\InnerBrowser::submitForm()+ */+ public function submitForm($selector, $params, $button = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('submitForm', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Fills a text field or textarea with value.+ *+ * Example:+ *+ * ``` php+ * <?php+ * $I->fillField("//input[@type='text']", "Hello World!");+ * $I->fillField(['name' => 'email'], '[email protected]');+ * ?>+ * ```+ *+ * @param $field+ * @param $value+ * @see \Codeception\Lib\InnerBrowser::fillField()+ */+ public function fillField($field, $value) {+ return $this->scenario->runStep(new \Codeception\Step\Action('fillField', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Selects an option in select tag or in radio button group.+ *+ * Example:+ *+ * ``` php+ * <?php+ * $I->selectOption('form select[name=account]', 'Premium');+ * $I->selectOption('form input[name=payment]', 'Monthly');+ * $I->selectOption('//form/select[@name=account]', 'Monthly');+ * ?>+ * ```+ *+ * Can select multiple options if second argument is array:+ *+ * ``` php+ * <?php+ * $I->selectOption('Which OS do you use?', array('Windows','Linux'));+ * ?>+ * ```+ *+ * @param $select+ * @param $option+ * @see \Codeception\Lib\InnerBrowser::selectOption()+ */+ public function selectOption($select, $option) {+ return $this->scenario->runStep(new \Codeception\Step\Action('selectOption', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Ticks a checkbox.+ * For radio buttons use `selectOption` method.+ *+ * Example:+ *+ * ``` php+ * <?php+ * $I->checkOption('#agree');+ * ?>+ * ```+ *+ * @param $option+ * @see \Codeception\Lib\InnerBrowser::checkOption()+ */+ public function checkOption($option) {+ return $this->scenario->runStep(new \Codeception\Step\Action('checkOption', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Unticks a checkbox.+ *+ * Example:+ *+ * ``` php+ * <?php+ * $I->uncheckOption('#notify');+ * ?>+ * ```+ *+ * @param $option+ * @see \Codeception\Lib\InnerBrowser::uncheckOption()+ */+ public function uncheckOption($option) {+ return $this->scenario->runStep(new \Codeception\Step\Action('uncheckOption', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Attaches file from Codeception data directory to upload field.+ *+ * Example:+ *+ * ``` php+ * <?php+ * // file is stored in 'tests/_data/prices.xls'+ * $I->attachFile('input[@type="file"]', 'prices.xls');+ * ?>+ * ```+ *+ * @param $field+ * @param $filename+ * @see \Codeception\Lib\InnerBrowser::attachFile()+ */+ public function attachFile($field, $filename) {+ return $this->scenario->runStep(new \Codeception\Step\Action('attachFile', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * If your page triggers an ajax request, you can perform it manually.+ * This action sends a GET ajax request with specified params.+ *+ * See ->sendAjaxPostRequest for examples.+ *+ * @param $uri+ * @param $params+ * @see \Codeception\Lib\InnerBrowser::sendAjaxGetRequest()+ */+ public function sendAjaxGetRequest($uri, $params = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxGetRequest', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * If your page triggers an ajax request, you can perform it manually.+ * This action sends a POST ajax request with specified params.+ * Additional params can be passed as array.+ *+ * Example:+ *+ * Imagine that by clicking checkbox you trigger ajax request which updates user settings.+ * We emulate that click by running this ajax request manually.+ *+ * ``` php+ * <?php+ * $I->sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST+ * $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET+ *+ * ```+ *+ * @param $uri+ * @param $params+ * @see \Codeception\Lib\InnerBrowser::sendAjaxPostRequest()+ */+ public function sendAjaxPostRequest($uri, $params = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxPostRequest', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * If your page triggers an ajax request, you can perform it manually.+ * This action sends an ajax request with specified method and params.+ *+ * Example:+ *+ * You need to perform an ajax request specifying the HTTP method.+ *+ * ``` php+ * <?php+ * $I->sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title'));+ *+ * ```+ *+ * @param $method+ * @param $uri+ * @param $params+ * @see \Codeception\Lib\InnerBrowser::sendAjaxRequest()+ */+ public function sendAjaxRequest($method, $uri, $params = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('sendAjaxRequest', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Finds and returns text contents of element.+ * Element is searched by CSS selector, XPath or matcher by regex.+ *+ * Example:+ *+ * ``` php+ * <?php+ * $heading = $I->grabTextFrom('h1');+ * $heading = $I->grabTextFrom('descendant-or-self::h1');+ * $value = $I->grabTextFrom('~<input value=(.*?)]~sgi');+ * ?>+ * ```+ *+ * @param $cssOrXPathOrRegex+ *+ * @return mixed+ * @see \Codeception\Lib\InnerBrowser::grabTextFrom()+ */+ public function grabTextFrom($cssOrXPathOrRegex) {+ return $this->scenario->runStep(new \Codeception\Step\Action('grabTextFrom', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Grabs attribute value from an element.+ * Fails if element is not found.+ *+ * ``` php+ * <?php+ * $I->grabAttributeFrom('#tooltip', 'title');+ * ?>+ * ```+ *+ *+ * @param $cssOrXpath+ * @param $attribute+ * @internal param $element+ * @return mixed+ * @see \Codeception\Lib\InnerBrowser::grabAttributeFrom()+ */+ public function grabAttributeFrom($cssOrXpath, $attribute) {+ return $this->scenario->runStep(new \Codeception\Step\Action('grabAttributeFrom', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * @param $field+ *+ * @return array|mixed|null|string+ * @see \Codeception\Lib\InnerBrowser::grabValueFrom()+ */+ public function grabValueFrom($field) {+ return $this->scenario->runStep(new \Codeception\Step\Action('grabValueFrom', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Sets a cookie.+ *+ * @param $cookie+ * @param $value+ *+ * @return mixed+ * @see \Codeception\Lib\InnerBrowser::setCookie()+ */+ public function setCookie($name, $val) {+ return $this->scenario->runStep(new \Codeception\Step\Action('setCookie', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Grabs a cookie value.+ *+ * @param $cookie+ *+ * @return mixed+ * @see \Codeception\Lib\InnerBrowser::grabCookie()+ */+ public function grabCookie($name) {+ return $this->scenario->runStep(new \Codeception\Step\Action('grabCookie', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that cookie is set.+ *+ * @param $cookie+ *+ * @return mixed+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::seeCookie()+ */+ public function canSeeCookie($name) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeCookie', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that cookie is set.+ *+ * @param $cookie+ *+ * @return mixed+ * @see \Codeception\Lib\InnerBrowser::seeCookie()+ */+ public function seeCookie($name) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seeCookie', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that cookie doesn't exist+ *+ * @param $cookie+ *+ * @return mixed+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::dontSeeCookie()+ */+ public function cantSeeCookie($name) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeCookie', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that cookie doesn't exist+ *+ * @param $cookie+ *+ * @return mixed+ * @see \Codeception\Lib\InnerBrowser::dontSeeCookie()+ */+ public function dontSeeCookie($name) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeCookie', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Unsets cookie+ *+ * @param $cookie+ *+ * @return mixed+ * @see \Codeception\Lib\InnerBrowser::resetCookie()+ */+ public function resetCookie($name) {+ return $this->scenario->runStep(new \Codeception\Step\Action('resetCookie', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if element exists on a page, matching it by CSS or XPath.+ * You can also specify expected attributes of this element.+ *+ * ``` php+ * <?php+ * $I->seeElement('.error');+ * $I->seeElement('//form/input[1]');+ * $I->seeElement('input', ['name' => 'login']);+ * $I->seeElement('input', ['value' => '123456']);+ *+ * // strict locator in first arg, attributes in second+ * $I->seeElement(['css' => 'form input'], ['name' => 'login']);+ * ?>+ * ```+ *+ * @param $selector+ * @param array $attributes+ * @return+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::seeElement()+ */+ public function canSeeElement($selector, $attributes = null) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeElement', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if element exists on a page, matching it by CSS or XPath.+ * You can also specify expected attributes of this element.+ *+ * ``` php+ * <?php+ * $I->seeElement('.error');+ * $I->seeElement('//form/input[1]');+ * $I->seeElement('input', ['name' => 'login']);+ * $I->seeElement('input', ['value' => '123456']);+ *+ * // strict locator in first arg, attributes in second+ * $I->seeElement(['css' => 'form input'], ['name' => 'login']);+ * ?>+ * ```+ *+ * @param $selector+ * @param array $attributes+ * @return+ * @see \Codeception\Lib\InnerBrowser::seeElement()+ */+ public function seeElement($selector, $attributes = null) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seeElement', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if element does not exist (or is visible) on a page, matching it by CSS or XPath+ * You can also specify expected attributes of this element.+ *+ * Example:+ *+ * ``` php+ * <?php+ * $I->dontSeeElement('.error');+ * $I->dontSeeElement('//form/input[1]');+ * $I->dontSeeElement('input', ['name' => 'login']);+ * $I->dontSeeElement('input', ['value' => '123456']);+ * ?>+ * ```+ *+ * @param $selector+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::dontSeeElement()+ */+ public function cantSeeElement($selector, $attributes = null) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeElement', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if element does not exist (or is visible) on a page, matching it by CSS or XPath+ * You can also specify expected attributes of this element.+ *+ * Example:+ *+ * ``` php+ * <?php+ * $I->dontSeeElement('.error');+ * $I->dontSeeElement('//form/input[1]');+ * $I->dontSeeElement('input', ['name' => 'login']);+ * $I->dontSeeElement('input', ['value' => '123456']);+ * ?>+ * ```+ *+ * @param $selector+ * @see \Codeception\Lib\InnerBrowser::dontSeeElement()+ */+ public function dontSeeElement($selector, $attributes = null) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeElement', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Tests number of $elements on page+ *+ * ``` php+ * <?php+ * $I->seeNumberOfElements('tr', 10);+ * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements+ * ?>+ * ```+ * @param $selector+ * @param mixed $expected:+ * - string: strict number+ * - array: range of numbers [0,10]+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements()+ */+ public function canSeeNumberOfElements($selector, $expected) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeNumberOfElements', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Tests number of $elements on page+ *+ * ``` php+ * <?php+ * $I->seeNumberOfElements('tr', 10);+ * $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements+ * ?>+ * ```+ * @param $selector+ * @param mixed $expected:+ * - string: strict number+ * - array: range of numbers [0,10]+ * @see \Codeception\Lib\InnerBrowser::seeNumberOfElements()+ */+ public function seeNumberOfElements($selector, $expected) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seeNumberOfElements', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if option is selected in select field.+ *+ * ``` php+ * <?php+ * $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');+ * ?>+ * ```+ *+ * @param $selector+ * @param $optionText+ *+ * @return mixed+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected()+ */+ public function canSeeOptionIsSelected($select, $optionText) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeOptionIsSelected', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if option is selected in select field.+ *+ * ``` php+ * <?php+ * $I->seeOptionIsSelected('#form input[name=payment]', 'Visa');+ * ?>+ * ```+ *+ * @param $selector+ * @param $optionText+ *+ * @return mixed+ * @see \Codeception\Lib\InnerBrowser::seeOptionIsSelected()+ */+ public function seeOptionIsSelected($select, $optionText) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seeOptionIsSelected', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if option is not selected in select field.+ *+ * ``` php+ * <?php+ * $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');+ * ?>+ * ```+ *+ * @param $selector+ * @param $optionText+ *+ * @return mixed+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()+ */+ public function cantSeeOptionIsSelected($select, $optionText) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeOptionIsSelected', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if option is not selected in select field.+ *+ * ``` php+ * <?php+ * $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');+ * ?>+ * ```+ *+ * @param $selector+ * @param $optionText+ *+ * @return mixed+ * @see \Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()+ */+ public function dontSeeOptionIsSelected($select, $optionText) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeOptionIsSelected', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Asserts that current page has 404 response status code.+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::seePageNotFound()+ */+ public function canSeePageNotFound() {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seePageNotFound', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Asserts that current page has 404 response status code.+ * @see \Codeception\Lib\InnerBrowser::seePageNotFound()+ */+ public function seePageNotFound() {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seePageNotFound', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that response code is equal to value provided.+ *+ * @param $code+ *+ * @return mixed+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()+ */+ public function canSeeResponseCodeIs($code) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeResponseCodeIs', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that response code is equal to value provided.+ *+ * @param $code+ *+ * @return mixed+ * @see \Codeception\Lib\InnerBrowser::seeResponseCodeIs()+ */+ public function seeResponseCodeIs($code) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seeResponseCodeIs', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that page title contains text.+ *+ * ``` php+ * <?php+ * $I->seeInTitle('Blog - Post #1');+ * ?>+ * ```+ *+ * @param $title+ *+ * @return mixed+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::seeInTitle()+ */+ public function canSeeInTitle($title) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInTitle', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that page title contains text.+ *+ * ``` php+ * <?php+ * $I->seeInTitle('Blog - Post #1');+ * ?>+ * ```+ *+ * @param $title+ *+ * @return mixed+ * @see \Codeception\Lib\InnerBrowser::seeInTitle()+ */+ public function seeInTitle($title) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInTitle', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that page title does not contain text.+ *+ * @param $title+ *+ * @return mixed+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle()+ */+ public function cantSeeInTitle($title) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInTitle', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that page title does not contain text.+ *+ * @param $title+ *+ * @return mixed+ * @see \Codeception\Lib\InnerBrowser::dontSeeInTitle()+ */+ public function dontSeeInTitle($title) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInTitle', func_get_args()));+ }+}diff --git a/tests/acceptance/_bootstrap.php b/tests/acceptance/_bootstrap.phpnew file mode 100644index 0000000000..8a88555806--- /dev/null+++ b/tests/acceptance/_bootstrap.php@@ -0,0 +1,2 @@+<?php+// Here you can initialize variables that will be available to your testsdiff --git a/tests/functional.suite.yml b/tests/functional.suite.ymlnew file mode 100644index 0000000000..3b17a39dc7--- /dev/null+++ b/tests/functional.suite.yml@@ -0,0 +1,9 @@+# Codeception Test Suite Configuration++# suite for functional (integration) tests.+# emulate web requests and make application process them.+# Include one of framework modules (Symfony2, Yii2, Laravel4) to use it.++class_name: FunctionalTester+modules:+ enabled: [Filesystem, FunctionalHelper]diff --git a/tests/functional/FunctionalTester.php b/tests/functional/FunctionalTester.phpnew file mode 100644index 0000000000..d6f11e1849--- /dev/null+++ b/tests/functional/FunctionalTester.php@@ -0,0 +1,358 @@+<?php //[STAMP] 59e49ea279d5425b7ca09a2f20d32bef++// This class was automatically generated by build task+// You should not change it manually as it will be overwritten on next build+// @codingStandardsIgnoreFile+++use Codeception\Module\Filesystem;+use Codeception\Module\FunctionalHelper;++/**+ * Inherited Methods+ * @method void wantToTest($text)+ * @method void wantTo($text)+ * @method void execute($callable)+ * @method void expectTo($prediction)+ * @method void expect($prediction)+ * @method void amGoingTo($argumentation)+ * @method void am($role)+ * @method void lookForwardTo($achieveValue)+ * @method void comment($description)+ * @method void haveFriend($name, $actorClass = null)+*/+class FunctionalTester extends \Codeception\Actor+{++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Enters a directory In local filesystem.+ * Project root directory is used by default+ *+ * @param $path+ * @see \Codeception\Module\Filesystem::amInPath()+ */+ public function amInPath($path) {+ return $this->scenario->runStep(new \Codeception\Step\Condition('amInPath', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Opens a file and stores it's content.+ *+ * Usage:+ *+ * ``` php+ * <?php+ * $I->openFile('composer.json');+ * $I->seeInThisFile('codeception/codeception');+ * ?>+ * ```+ *+ * @param $filename+ * @see \Codeception\Module\Filesystem::openFile()+ */+ public function openFile($filename) {+ return $this->scenario->runStep(new \Codeception\Step\Action('openFile', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Deletes a file+ *+ * ``` php+ * <?php+ * $I->deleteFile('composer.lock');+ * ?>+ * ```+ *+ * @param $filename+ * @see \Codeception\Module\Filesystem::deleteFile()+ */+ public function deleteFile($filename) {+ return $this->scenario->runStep(new \Codeception\Step\Action('deleteFile', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Deletes directory with all subdirectories+ *+ * ``` php+ * <?php+ * $I->deleteDir('vendor');+ * ?>+ * ```+ *+ * @param $dirname+ * @see \Codeception\Module\Filesystem::deleteDir()+ */+ public function deleteDir($dirname) {+ return $this->scenario->runStep(new \Codeception\Step\Action('deleteDir', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Copies directory with all contents+ *+ * ``` php+ * <?php+ * $I->copyDir('vendor','old_vendor');+ * ?>+ * ```+ *+ * @param $src+ * @param $dst+ * @see \Codeception\Module\Filesystem::copyDir()+ */+ public function copyDir($src, $dst) {+ return $this->scenario->runStep(new \Codeception\Step\Action('copyDir', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks If opened file has `text` in it.+ *+ * Usage:+ *+ * ``` php+ * <?php+ * $I->openFile('composer.json');+ * $I->seeInThisFile('codeception/codeception');+ * ?>+ * ```+ *+ * @param $text+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Module\Filesystem::seeInThisFile()+ */+ public function canSeeInThisFile($text) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeInThisFile', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks If opened file has `text` in it.+ *+ * Usage:+ *+ * ``` php+ * <?php+ * $I->openFile('composer.json');+ * $I->seeInThisFile('codeception/codeception');+ * ?>+ * ```+ *+ * @param $text+ * @see \Codeception\Module\Filesystem::seeInThisFile()+ */+ public function seeInThisFile($text) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seeInThisFile', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks the strict matching of file contents.+ * Unlike `seeInThisFile` will fail if file has something more than expected lines.+ * Better to use with HEREDOC strings.+ * Matching is done after removing "\r" chars from file content.+ *+ * ``` php+ * <?php+ * $I->openFile('process.pid');+ * $I->seeFileContentsEqual('3192');+ * ?>+ * ```+ *+ * @param $text+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Module\Filesystem::seeFileContentsEqual()+ */+ public function canSeeFileContentsEqual($text) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileContentsEqual', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks the strict matching of file contents.+ * Unlike `seeInThisFile` will fail if file has something more than expected lines.+ * Better to use with HEREDOC strings.+ * Matching is done after removing "\r" chars from file content.+ *+ * ``` php+ * <?php+ * $I->openFile('process.pid');+ * $I->seeFileContentsEqual('3192');+ * ?>+ * ```+ *+ * @param $text+ * @see \Codeception\Module\Filesystem::seeFileContentsEqual()+ */+ public function seeFileContentsEqual($text) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileContentsEqual', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks If opened file doesn't contain `text` in it+ *+ * ``` php+ * <?php+ * $I->openFile('composer.json');+ * $I->dontSeeInThisFile('codeception/codeception');+ * ?>+ * ```+ *+ * @param $text+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Module\Filesystem::dontSeeInThisFile()+ */+ public function cantSeeInThisFile($text) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInThisFile', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks If opened file doesn't contain `text` in it+ *+ * ``` php+ * <?php+ * $I->openFile('composer.json');+ * $I->dontSeeInThisFile('codeception/codeception');+ * ?>+ * ```+ *+ * @param $text+ * @see \Codeception\Module\Filesystem::dontSeeInThisFile()+ */+ public function dontSeeInThisFile($text) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeInThisFile', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Deletes a file+ * @see \Codeception\Module\Filesystem::deleteThisFile()+ */+ public function deleteThisFile() {+ return $this->scenario->runStep(new \Codeception\Step\Action('deleteThisFile', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if file exists in path.+ * Opens a file when it's exists+ *+ * ``` php+ * <?php+ * $I->seeFileFound('UserModel.php','app/models');+ * ?>+ * ```+ *+ * @param $filename+ * @param string $path+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Module\Filesystem::seeFileFound()+ */+ public function canSeeFileFound($filename, $path = null) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('seeFileFound', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if file exists in path.+ * Opens a file when it's exists+ *+ * ``` php+ * <?php+ * $I->seeFileFound('UserModel.php','app/models');+ * ?>+ * ```+ *+ * @param $filename+ * @param string $path+ * @see \Codeception\Module\Filesystem::seeFileFound()+ */+ public function seeFileFound($filename, $path = null) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('seeFileFound', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if file does not exists in path+ *+ * @param $filename+ * @param string $path+ * Conditional Assertion: Test won't be stopped on fail+ * @see \Codeception\Module\Filesystem::dontSeeFileFound()+ */+ public function cantSeeFileFound($filename, $path = null) {+ return $this->scenario->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeFileFound', func_get_args()));+ }+ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks if file does not exists in path+ *+ * @param $filename+ * @param string $path+ * @see \Codeception\Module\Filesystem::dontSeeFileFound()+ */+ public function dontSeeFileFound($filename, $path = null) {+ return $this->scenario->runStep(new \Codeception\Step\Assertion('dontSeeFileFound', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Erases directory contents+ *+ * ``` php+ * <?php+ * $I->cleanDir('logs');+ * ?>+ * ```+ *+ * @param $dirname+ * @see \Codeception\Module\Filesystem::cleanDir()+ */+ public function cleanDir($dirname) {+ return $this->scenario->runStep(new \Codeception\Step\Action('cleanDir', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Saves contents to file+ *+ * @param $filename+ * @param $contents+ * @see \Codeception\Module\Filesystem::writeToFile()+ */+ public function writeToFile($filename, $contents) {+ return $this->scenario->runStep(new \Codeception\Step\Action('writeToFile', func_get_args()));+ }+}diff --git a/tests/functional/_bootstrap.php b/tests/functional/_bootstrap.phpnew file mode 100644index 0000000000..8a88555806--- /dev/null+++ b/tests/functional/_bootstrap.php@@ -0,0 +1,2 @@+<?php+// Here you can initialize variables that will be available to your testsdiff --git a/tests/unit.suite.yml b/tests/unit.suite.ymlnew file mode 100644index 0000000000..4ffbf160ec--- /dev/null+++ b/tests/unit.suite.yml@@ -0,0 +1,6 @@+# Codeception Test Suite Configuration++# suite for unit (internal) tests.+class_name: UnitTester+modules:+ enabled: [Asserts, UnitHelper]diff --git a/tests/unit/UnitTester.php b/tests/unit/UnitTester.phpnew file mode 100644index 0000000000..67d06cdad3--- /dev/null+++ b/tests/unit/UnitTester.php@@ -0,0 +1,266 @@+<?php //[STAMP] c03a19ab6ad087934a18d04c48d8412a++// This class was automatically generated by build task+// You should not change it manually as it will be overwritten on next build+// @codingStandardsIgnoreFile+++use Codeception\Module\Asserts;+use Codeception\Module\UnitHelper;++/**+ * Inherited Methods+ * @method void wantToTest($text)+ * @method void wantTo($text)+ * @method void execute($callable)+ * @method void expectTo($prediction)+ * @method void expect($prediction)+ * @method void amGoingTo($argumentation)+ * @method void am($role)+ * @method void lookForwardTo($achieveValue)+ * @method void comment($description)+ * @method void haveFriend($name, $actorClass = null)+*/+class UnitTester extends \Codeception\Actor+{++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that two variables are equal.+ *+ * @param $expected+ * @param $actual+ * @param string $message+ *+ * @return mixed+ * @see \Codeception\Module\Asserts::assertEquals()+ */+ public function assertEquals($expected, $actual, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertEquals', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that two variables are not equal+ *+ * @param $expected+ * @param $actual+ * @param string $message+ * @see \Codeception\Module\Asserts::assertNotEquals()+ */+ public function assertNotEquals($expected, $actual, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that expected is greater than actual+ *+ * @param $expected+ * @param $actual+ * @param string $message+ * @see \Codeception\Module\Asserts::assertGreaterThan()+ */+ public function assertGreaterThan($expected, $actual, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * @deprecated+ * @see \Codeception\Module\Asserts::assertGreaterThen()+ */+ public function assertGreaterThen($expected, $actual, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThen', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that expected is greater or equal than actual+ *+ * @param $expected+ * @param $actual+ * @param string $message+ * @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()+ */+ public function assertGreaterThanOrEqual($expected, $actual, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * @deprecated+ * @see \Codeception\Module\Asserts::assertGreaterThenOrEqual()+ */+ public function assertGreaterThenOrEqual($expected, $actual, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThenOrEqual', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that expected is less than actual+ *+ * @param $expected+ * @param $actual+ * @param string $message+ * @see \Codeception\Module\Asserts::assertLessThan()+ */+ public function assertLessThan($expected, $actual, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that expected is less or equal than actual+ *+ * @param $expected+ * @param $actual+ * @param string $message+ * @see \Codeception\Module\Asserts::assertLessThanOrEqual()+ */+ public function assertLessThanOrEqual($expected, $actual, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that haystack contains needle+ *+ * @param $needle+ * @param $haystack+ * @param string $message+ * @see \Codeception\Module\Asserts::assertContains()+ */+ public function assertContains($needle, $haystack, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertContains', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that haystack doesn't contain needle.+ *+ * @param $needle+ * @param $haystack+ * @param string $message+ * @see \Codeception\Module\Asserts::assertNotContains()+ */+ public function assertNotContains($needle, $haystack, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that variable is empty.+ *+ * @param $actual+ * @param string $message+ * @see \Codeception\Module\Asserts::assertEmpty()+ */+ public function assertEmpty($actual, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that variable is not empty.+ *+ * @param $actual+ * @param string $message+ * @see \Codeception\Module\Asserts::assertNotEmpty()+ */+ public function assertNotEmpty($actual, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that variable is NULL+ *+ * @param $actual+ * @param string $message+ * @see \Codeception\Module\Asserts::assertNull()+ */+ public function assertNull($actual, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertNull', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that variable is not NULL+ *+ * @param $actual+ * @param string $message+ * @see \Codeception\Module\Asserts::assertNotNull()+ */+ public function assertNotNull($actual, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that condition is positive.+ *+ * @param $condition+ * @param string $message+ * @see \Codeception\Module\Asserts::assertTrue()+ */+ public function assertTrue($condition, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertTrue', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Checks that condition is negative.+ *+ * @param $condition+ * @param string $message+ * @see \Codeception\Module\Asserts::assertFalse()+ */+ public function assertFalse($condition, $message = null) {+ return $this->scenario->runStep(new \Codeception\Step\Action('assertFalse', func_get_args()));+ }+++ /**+ * [!] Method is generated. Documentation taken from corresponding module.+ *+ * Fails the test with message.+ *+ * @param $message+ * @see \Codeception\Module\Asserts::fail()+ */+ public function fail($message) {+ return $this->scenario->runStep(new \Codeception\Step\Action('fail', func_get_args()));+ }+}diff --git a/tests/unit/_bootstrap.php b/tests/unit/_bootstrap.phpnew file mode 100644index 0000000000..8a88555806--- /dev/null+++ b/tests/unit/_bootstrap.php@@ -0,0 +1,2 @@+<?php+// Here you can initialize variables that will be available to your tests