Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
8775e25c
Commit
8775e25c
authored
Nov 14, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added readme and updated test helper classes.
parent
220e6dc4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2226 additions
and
531 deletions
+2226
-531
README.md
apps/basic/tests/README.md
+7
-1
WebGuy.php
apps/basic/tests/acceptance/WebGuy.php
+1085
-282
TestGuy.php
apps/basic/tests/functional/TestGuy.php
+1125
-242
CodeGuy.php
apps/basic/tests/unit/CodeGuy.php
+9
-6
No files found.
apps/basic/tests/README.md
View file @
8775e25c
...
...
@@ -4,6 +4,7 @@ These tests are developed with [Codeception PHP Testing Framework](http://codece
To run the tests, follow these steps:
1.
[
Install Codeception
](
http://codeception.com/quickstart
)
if you do not have it yet.
2.
Update tests
2.
Create test configuration files based on your environment:
-
Copy
`acceptance.suite.dist.yml`
to
`acceptance.suite.yml`
and customize it;
-
Copy
`functional.suite.dist.yml`
to
`functional.suite.yml`
and customize it;
...
...
@@ -11,5 +12,10 @@ To run the tests, follow these steps:
3.
Switch to the parent folder and run tests:
```
php codecept.phar run
cd ..
php codecept.phar build // rebuild test scripts, only need to be run once
php codecept.phar run // run all available tests
```
Please refer to
[
Codeception tutorial
](
http://codeception.com/docs/01-Introduction
)
for
more details about writing acceptance, functional and unit tests.
apps/basic/tests/acceptance/WebGuy.php
View file @
8775e25c
...
...
@@ -17,13 +17,21 @@ use Codeception\Module\WebHelper;
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($role)
* @method void lookForwardTo($achieveValue)
* @method void offsetGet($offset)
* @method void offsetSet($offset, $value)
* @method void offsetExists($offset)
* @method void offsetUnset($offset)
*/
class
WebGuy
extends
\Codeception\AbstractGuy
{
/**
* This 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.
...
...
@@ -36,7 +44,7 @@ class WebGuy extends \Codeception\AbstractGuy
*
* ``` php
* <?php
* $I->submitForm('#login',
['login' => 'davert', 'password' => '123456']
);
* $I->submitForm('#login',
array('login' => 'davert', 'password' => '123456')
);
*
* ```
*
...
...
@@ -55,20 +63,18 @@ class WebGuy extends \Codeception\AbstractGuy
*
* ``` php
* <?php
* $I->submitForm('#userForm',
['user' => ['login' => 'Davert', 'password' => '123456', 'agree' => true]]
);
* $I->submitForm('#userForm',
array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true))
);
*
* ```
* Note, that pricing plan will be set to Paid, as it's selected on page.
*
* @param $selector
* @param $params
* @see PhpBrowser::submitForm()
* @see
Codeception\Module\
PhpBrowser::submitForm()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
submitForm
(
$selector
,
$params
)
{
$this
->
scenario
->
a
ction
(
'submitForm'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'submitForm'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -78,6 +84,10 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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.
...
...
@@ -89,20 +99,18 @@ class WebGuy extends \Codeception\AbstractGuy
*
* ``` php
* <?php
* $I->sendAjaxPostRequest('/updateSettings',
['notifications' => true]
; // POST
* $I->sendAjaxGetRequest('/updateSettings',
['notifications' => true]
; // GET
* $I->sendAjaxPostRequest('/updateSettings',
array('notifications' => true)
; // POST
* $I->sendAjaxGetRequest('/updateSettings',
array('notifications' => true)
; // GET
*
* ```
*
* @param $uri
* @param $params
* @see PhpBrowser::sendAjaxPostRequest()
* @see
Codeception\Module\
PhpBrowser::sendAjaxPostRequest()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
sendAjaxPostRequest
(
$uri
,
$params
=
null
)
{
$this
->
scenario
->
a
ction
(
'sendAjaxPostRequest'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'sendAjaxPostRequest'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -112,6 +120,10 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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.
*
...
...
@@ -119,13 +131,11 @@ class WebGuy extends \Codeception\AbstractGuy
*
* @param $uri
* @param $params
* @see PhpBrowser::sendAjaxGetRequest()
* @see
Codeception\Module\
PhpBrowser::sendAjaxGetRequest()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
sendAjaxGetRequest
(
$uri
,
$params
=
null
)
{
$this
->
scenario
->
a
ction
(
'sendAjaxGetRequest'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'sendAjaxGetRequest'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -135,14 +145,34 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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\Module\PhpBrowser::seePageNotFound()
* @return \Codeception\Maybe
*/
public
function
canSeePageNotFound
()
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seePageNotFound'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Asserts that current page has 404 response status code.
* @see PhpBrowser::seePageNotFound()
* @see
Codeception\Module\
PhpBrowser::seePageNotFound()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seePageNotFound
()
{
$this
->
scenario
->
a
ssertion
(
'seePageNotFound'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seePageNotFound'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -152,17 +182,40 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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\Module\PhpBrowser::seeResponseCodeIs()
* @return \Codeception\Maybe
*/
public
function
canSeeResponseCodeIs
(
$code
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeResponseCodeIs'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks that response code is equal to value provided.
*
* @param $code
* @return mixed
* @see PhpBrowser::seeResponseCodeIs()
* @see
Codeception\Module\
PhpBrowser::seeResponseCodeIs()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeResponseCodeIs
(
$code
)
{
$this
->
scenario
->
a
ssertion
(
'seeResponseCodeIs'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeResponseCodeIs'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -172,17 +225,19 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Adds HTTP authentication via username/password.
*
* @param $username
* @param $password
* @see PhpBrowser::amHttpAuthenticated()
* @see
Codeception\Module\
PhpBrowser::amHttpAuthenticated()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
amHttpAuthenticated
(
$username
,
$password
)
{
$this
->
scenario
->
condition
(
'amHttpAuthenticated'
,
func_get_args
(
));
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Condition
(
'amHttpAuthenticated'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -192,6 +247,10 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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
*
...
...
@@ -202,12 +261,12 @@ class WebGuy extends \Codeception\AbstractGuy
* // from the official Guzzle manual
* $I->amGoingTo('Sign all requests with OAuth');
* $I->executeInGuzzle(function (\Guzzle\Http\Client $client) {
* $client->addSubscriber(new Guzzle\Plugin\Oauth\OauthPlugin(
[
* $client->addSubscriber(new Guzzle\Plugin\Oauth\OauthPlugin(
array(
* 'consumer_key' => '***',
* 'consumer_secret' => '***',
* 'token' => '***',
* 'token_secret' => '***'
*
]
));
*
)
));
* });
* ?>
* ```
...
...
@@ -216,13 +275,135 @@ class WebGuy extends \Codeception\AbstractGuy
* If Codeception lacks important Guzzle Client methods implement then and submit patches.
*
* @param callable $function
* @see PhpBrowser::executeInGuzzle()
* @see
Codeception\Module\
PhpBrowser::executeInGuzzle()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
executeInGuzzle
(
$function
)
{
$this
->
scenario
->
action
(
'executeInGuzzle'
,
func_get_args
());
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Action
(
'executeInGuzzle'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Module\PhpBrowser::seeCheckboxIsChecked()
* @return \Codeception\Maybe
*/
public
function
canSeeCheckboxIsChecked
(
$checkbox
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeCheckboxIsChecked'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Module\PhpBrowser::seeCheckboxIsChecked()
* @return \Codeception\Maybe
*/
public
function
seeCheckboxIsChecked
(
$checkbox
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Assertion
(
'seeCheckboxIsChecked'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Module\PhpBrowser::dontSeeCheckboxIsChecked()
* @return \Codeception\Maybe
*/
public
function
cantSeeCheckboxIsChecked
(
$checkbox
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeCheckboxIsChecked'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Module\PhpBrowser::dontSeeCheckboxIsChecked()
* @return \Codeception\Maybe
*/
public
function
dontSeeCheckboxIsChecked
(
$checkbox
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Assertion
(
'dontSeeCheckboxIsChecked'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -232,16 +413,18 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Opens the page.
*
* @param $page
* @see Mink::amOnPage()
* @see
Codeception\Util\
Mink::amOnPage()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
amOnPage
(
$page
)
{
$this
->
scenario
->
condition
(
'amOnPage'
,
func_get_args
(
));
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Condition
(
'amOnPage'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -251,6 +434,10 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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
*
...
...
@@ -267,13 +454,54 @@ class WebGuy extends \Codeception\AbstractGuy
* ```
* @param $subdomain
* @return mixed
* @see Mink::amOnSubdomain()
* @see
Codeception\Util\
Mink::amOnSubdomain()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
amOnSubdomain
(
$subdomain
)
{
$this
->
scenario
->
condition
(
'amOnSubdomain'
,
func_get_args
());
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Condition
(
'amOnSubdomain'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* @param string $text
* @param string $selector
*
* @return void
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Mink::dontSee()
* @return \Codeception\Maybe
*/
public
function
cantSee
(
$text
,
$selector
=
null
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSee'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* @param string $text
* @param string $selector
*
* @return void
* @see Codeception\Util\Mink::dontSee()
* @return \Codeception\Maybe
*/
public
function
dontSee
(
$text
,
$selector
=
null
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Assertion
(
'dontSee'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -283,36 +511,42 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* Check if current page doesn't contain the text specified.
* This 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
* <?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
* $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 Mink::dontSee()
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Mink::see()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dont
See
(
$text
,
$selector
=
null
)
{
$this
->
scenario
->
a
ction
(
'dontSee'
,
func_get_args
(
));
public
function
can
See
(
$text
,
$selector
=
null
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\ConditionalAssertion
(
'see'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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.
*
...
...
@@ -323,18 +557,16 @@ class WebGuy extends \Codeception\AbstractGuy
* $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 Mink::see()
* @see
Codeception\Util\
Mink::see()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
see
(
$text
,
$selector
=
null
)
{
$this
->
scenario
->
a
ssertion
(
'see'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'see'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -344,6 +576,10 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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.
*
...
...
@@ -353,18 +589,47 @@ class WebGuy extends \Codeception\AbstractGuy
* <?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\Util\Mink::seeLink()
* @return \Codeception\Maybe
*/
public
function
canSeeLink
(
$text
,
$url
=
null
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeLink'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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 Mink::seeLink()
* @see
Codeception\Util\
Mink::seeLink()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeLink
(
$text
,
$url
=
null
)
{
$this
->
scenario
->
a
ssertion
(
'seeLink'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeLink'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -374,6 +639,10 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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.
*
...
...
@@ -382,18 +651,46 @@ class WebGuy extends \Codeception\AbstractGuy
* ``` 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\Util\Mink::dontSeeLink()
* @return \Codeception\Maybe
*/
public
function
cantSeeLink
(
$text
,
$url
=
null
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeLink'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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 Mink::dontSeeLink()
* @see
Codeception\Util\
Mink::dontSeeLink()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSeeLink
(
$text
,
$url
=
null
)
{
$this
->
scenario
->
a
ction
(
'dontSeeLink'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSeeLink'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -403,6 +700,10 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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.
...
...
@@ -431,13 +732,11 @@ class WebGuy extends \Codeception\AbstractGuy
* ```
* @param $link
* @param $context
* @see Mink::click()
* @see
Codeception\Util\
Mink::click()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
click
(
$link
,
$context
=
null
)
{
$this
->
scenario
->
a
ction
(
'click'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'click'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -447,22 +746,50 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks if element exists on a page, matching it by CSS or XPath
*
* ``` php
* <?php
* $I->seeElement('.error');
* $I->seeElement('//form/input[1]');
* ?>
* ```
* @param $selector
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Mink::seeElement()
* @return \Codeception\Maybe
*/
public
function
canSeeElement
(
$selector
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeElement'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks if element exists on a page, matching it by CSS or XPath
*
* ``` php
* <?php
* $I->seeElement('.error');
* $I->seeElement(
//form/input[1]
);
* $I->seeElement(
'//form/input[1]'
);
* ?>
* ```
* @param $selector
* @see Mink::seeElement()
* @see
Codeception\Util\
Mink::seeElement()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeElement
(
$selector
)
{
$this
->
scenario
->
a
ssertion
(
'seeElement'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeElement'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -472,22 +799,54 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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
*
* Example:
*
* ``` php
* <?php
* $I->dontSeeElement('.error');
* $I->dontSeeElement('//form/input[1]');
* ?>
* ```
* @param $selector
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Mink::dontSeeElement()
* @return \Codeception\Maybe
*/
public
function
cantSeeElement
(
$selector
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeElement'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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
*
* Example:
*
* ``` php
* <?php
* $I->dontSeeElement('.error');
* $I->dontSeeElement(
//form/input[1]
);
* $I->dontSeeElement(
'//form/input[1]'
);
* ?>
* ```
* @param $selector
* @see Mink::dontSeeElement()
* @see
Codeception\Util\
Mink::dontSeeElement()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSeeElement
(
$selector
)
{
$this
->
scenario
->
a
ction
(
'dontSeeElement'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSeeElement'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -497,14 +856,16 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Reloads current page
* @see Mink::reloadPage()
* @see
Codeception\Util\
Mink::reloadPage()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
reloadPage
()
{
$this
->
scenario
->
a
ction
(
'reloadPage'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'reloadPage'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -514,14 +875,16 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Moves back in history
* @see Mink::moveBack()
* @see
Codeception\Util\
Mink::moveBack()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
moveBack
()
{
$this
->
scenario
->
a
ction
(
'moveBack'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'moveBack'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -531,14 +894,16 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Moves forward in history
* @see Mink::moveForward()
* @see
Codeception\Util\
Mink::moveForward()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
moveForward
()
{
$this
->
scenario
->
a
ction
(
'moveForward'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'moveForward'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -548,17 +913,27 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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!");
* ?>
* ```
*
* @param $field
* @param $value
* @see Mink::fillField()
* @see
Codeception\Util\
Mink::fillField()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
fillField
(
$field
,
$value
)
{
$this
->
scenario
->
a
ction
(
'fillField'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'fillField'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -568,27 +943,265 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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');
* $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\Util\Mink::selectOption()
* @return \Codeception\Maybe
*/
public
function
selectOption
(
$select
,
$option
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Action
(
'selectOption'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Mink::checkOption()
* @return \Codeception\Maybe
*/
public
function
checkOption
(
$option
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Action
(
'checkOption'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Unticks a checkbox.
*
* Example:
*
* ``` php
* <?php
* $I->uncheckOption('#notify');
* ?>
* ```
*
* @param $option
* @see Codeception\Util\Mink::uncheckOption()
* @return \Codeception\Maybe
*/
public
function
uncheckOption
(
$option
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Action
(
'uncheckOption'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Mink::seeInCurrentUrl()
* @return \Codeception\Maybe
*/
public
function
canSeeInCurrentUrl
(
$uri
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeInCurrentUrl'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Mink::seeInCurrentUrl()
* @return \Codeception\Maybe
*/
public
function
seeInCurrentUrl
(
$uri
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Assertion
(
'seeInCurrentUrl'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Mink::dontSeeInCurrentUrl()
* @return \Codeception\Maybe
*/
public
function
cantSeeInCurrentUrl
(
$uri
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeInCurrentUrl'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Mink::dontSeeInCurrentUrl()
* @return \Codeception\Maybe
*/
public
function
dontSeeInCurrentUrl
(
$uri
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Assertion
(
'dontSeeInCurrentUrl'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Mink::seeCurrentUrlEquals()
* @return \Codeception\Maybe
*/
public
function
canSeeCurrentUrlEquals
(
$uri
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeCurrentUrlEquals'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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 $select
* @param $option
* @see Mink::selectOption()
* @param $uri
* @see Codeception\Util\Mink::seeCurrentUrlEquals()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
se
lectOption
(
$select
,
$option
)
{
$this
->
scenario
->
a
ction
(
'selectOption'
,
func_get_args
(
));
public
function
se
eCurrentUrlEquals
(
$uri
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeCurrentUrlEquals'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -598,52 +1211,54 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* Ticks a checkbox.
* For radio buttons use `selectOption` method.
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Example:
* Checks that current url is not equal to value.
* Unlike `dontSeeInCurrentUrl` performs a strict check.
*
* ``` php
* <?php
* $I->checkOption('#agree');
* // current url is not root
* $I->dontSeeCurrentUrlEquals('/');
* ?>
* ```
*
* @param $option
* @see Mink::checkOption()
* @param $uri
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Mink::dontSeeCurrentUrlEquals()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
c
heckOption
(
$option
)
{
$this
->
scenario
->
a
ction
(
'checkOption'
,
func_get_args
(
));
public
function
c
antSeeCurrentUrlEquals
(
$uri
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeCurrentUrlEquals'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* Unticks a checkbox.
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Example:
* Checks that current url is not equal to value.
* Unlike `dontSeeInCurrentUrl` performs a strict check.
*
* ``` php
* <?php
* $I->uncheckOption('#notify');
* // current url is not root
* $I->dontSeeCurrentUrlEquals('/');
* ?>
* ```
*
* @param $
option
* @see
Mink::uncheckOption
()
* @param $
uri
* @see
Codeception\Util\Mink::dontSeeCurrentUrlEquals
()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
uncheckOption
(
$option
)
{
$this
->
scenario
->
a
ction
(
'uncheckOption'
,
func_get_args
(
));
public
function
dontSeeCurrentUrlEquals
(
$uri
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSeeCurrentUrlEquals'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -653,50 +1268,52 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* Checks that current uri contains a value
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks that current url is matches a RegEx value
*
* ``` php
* <?php
* // to match: /home/dashboard
* $I->seeInCurrentUrl('home');
* // to match: /users/1
* $I->seeInCurrentUrl('/users/');
* // to match root url
* $I->seeCurrentUrlMatches('~$/users/(\d+)~');
* ?>
* ```
*
* @param $uri
* @see Mink::seeInCurrentUrl()
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Mink::seeCurrentUrlMatches()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeInCurrentUrl
(
$uri
)
{
$this
->
scenario
->
a
ssertion
(
'seeInCurrentUrl'
,
func_get_args
(
));
public
function
canSeeCurrentUrlMatches
(
$uri
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeCurrentUrlMatches'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* Checks that current uri does not contain a value
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks that current url is matches a RegEx value
*
* ``` php
* <?php
* $I->dontSeeInCurrentUrl('/users/');
* // to match root url
* $I->seeCurrentUrlMatches('~$/users/(\d+)~');
* ?>
* ```
*
* @param $uri
* @see
Mink::dontSeeInCurrentUrl
()
* @see
Codeception\Util\Mink::seeCurrentUrlMatches
()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSeeInCurrentUrl
(
$uri
)
{
$this
->
scenario
->
a
ction
(
'dontSeeInCurrentUrl'
,
func_get_args
(
));
public
function
seeCurrentUrlMatches
(
$uri
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeCurrentUrlMatches'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -706,47 +1323,52 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* Checks that current url is equal to value.
* Unlike `seeInCurrentUrl` performs a strict check.
* This 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->
seeCurrentUrlEquals('/
');
* $I->
dontSeeCurrentUrlMatches('~$/users/(\d+)~
');
* ?>
* ```
*
* @param $uri
* @see Mink::seeCurrentUrlEquals()
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Mink::dontSeeCurrentUrlMatches()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeCurrentUrlEqual
s
(
$uri
)
{
$this
->
scenario
->
a
ssertion
(
'seeCurrentUrlEquals'
,
func_get_args
(
));
public
function
cantSeeCurrentUrlMatche
s
(
$uri
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeCurrentUrlMatches'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* Checks that current url is not equal to value.
* Unlike `dontSeeInCurrentUrl` performs a strict check.
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks that current url does not match a RegEx value
*
* ``` php
* <?php
* //
current url is not root
* $I->dontSeeCurrentUrl
Equals('/
');
* //
to match root url
* $I->dontSeeCurrentUrl
Matches('~$/users/(\d+)~
');
* ?>
* ```
*
* @param $uri
* @see
Mink::dontSeeCurrentUrlEqual
s()
* @see
Codeception\Util\Mink::dontSeeCurrentUrlMatche
s()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSeeCurrentUrl
Equal
s
(
$uri
)
{
$this
->
scenario
->
a
ction
(
'dontSeeCurrentUrlEquals'
,
func_get_args
(
));
public
function
dontSeeCurrentUrl
Matche
s
(
$uri
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSeeCurrentUrlMatches'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -756,45 +1378,40 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* Checks that current url is matches a RegEx value
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* <?php
* // to match root url
* $I->seeCurrentUrlMatches('~$/users/(\d+)~');
* ?>
* Checks that cookie is set.
*
* @param $uri
* @see Mink::seeCurrentUrlMatches()
* @param $cookie
* @return mixed
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Mink::seeCookie()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeCurrentUrlMatches
(
$uri
)
{
$this
->
scenario
->
a
ssertion
(
'seeCurrentUrlMatches'
,
func_get_args
(
));
public
function
canSeeCookie
(
$cookie
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeCookie'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* Checks that current url does not match a RegEx value
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* <?php
* // to match root url
* $I->dontSeeCurrentUrlMatches('~$/users/(\d+)~');
* ?>
* Checks that cookie is set.
*
* @param $uri
* @see Mink::dontSeeCurrentUrlMatches()
* @param $cookie
* @return mixed
* @see Codeception\Util\Mink::seeCookie()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSeeCurrentUrlMatches
(
$uri
)
{
$this
->
scenario
->
a
ction
(
'dontSeeCurrentUrlMatches'
,
func_get_args
(
));
public
function
seeCookie
(
$cookie
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeCookie'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -804,31 +1421,40 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* @see Mink::seeCookie()
* Checks that cookie doesn't exist
*
* @param $cookie
* @return mixed
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Mink::dontSeeCookie()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
s
eeCookie
(
$cookie
)
{
$this
->
scenario
->
a
ssertion
(
'seeCookie'
,
func_get_args
(
));
public
function
cantS
eeCookie
(
$cookie
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeCookie'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks that cookie doesn't exist
*
* @see Mink::dontSeeCookie()
* @param $cookie
* @return mixed
* @see Codeception\Util\Mink::dontSeeCookie()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSeeCookie
(
$cookie
)
{
$this
->
scenario
->
a
ction
(
'dontSeeCookie'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSeeCookie'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -838,14 +1464,20 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Sets a cookie.
*
* @see Mink::setCookie()
* @param $cookie
* @param $value
* @return mixed
* @see Codeception\Util\Mink::setCookie()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
setCookie
(
$cookie
,
$value
)
{
$this
->
scenario
->
a
ction
(
'setCookie'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'setCookie'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -855,14 +1487,19 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* @see Mink::resetCookie()
* Unsets cookie
*
* @param $cookie
* @return mixed
* @see Codeception\Util\Mink::resetCookie()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
resetCookie
(
$cookie
)
{
$this
->
scenario
->
a
ction
(
'resetCookie'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'resetCookie'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -872,14 +1509,19 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* @see Mink::grabCookie()
* Grabs a cookie value.
*
* @param $cookie
* @return mixed
* @see Codeception\Util\Mink::grabCookie()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
grabCookie
(
$cookie
)
{
$this
->
scenario
->
a
ction
(
'grabCookie'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'grabCookie'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -889,6 +1531,10 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Takes a parameters from current URI by RegEx.
* If no url provided returns full URI.
*
...
...
@@ -902,13 +1548,11 @@ class WebGuy extends \Codeception\AbstractGuy
* @param null $uri
* @internal param $url
* @return mixed
* @see Mink::grabFromCurrentUrl()
* @see
Codeception\Util\
Mink::grabFromCurrentUrl()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
grabFromCurrentUrl
(
$uri
=
null
)
{
$this
->
scenario
->
a
ction
(
'grabFromCurrentUrl'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'grabFromCurrentUrl'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -918,26 +1562,28 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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/test
s.xls'
* $I->attachFile('prices.xls');
* // file is stored in 'tests/
_data/price
s.xls'
* $I->attachFile('
input[@type="file"]', '
prices.xls');
* ?>
* ```
*
* @param $field
* @param $filename
* @see Mink::attachFile()
* @see
Codeception\Util\
Mink::attachFile()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
attachFile
(
$field
,
$filename
)
{
$this
->
scenario
->
a
ction
(
'attachFile'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'attachFile'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -947,6 +1593,38 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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\Util\Mink::seeOptionIsSelected()
* @return \Codeception\Maybe
*/
public
function
canSeeOptionIsSelected
(
$select
,
$text
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeOptionIsSelected'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks if option is selected in select field.
*
* ``` php
...
...
@@ -958,13 +1636,11 @@ class WebGuy extends \Codeception\AbstractGuy
* @param $selector
* @param $optionText
* @return mixed
* @see Mink::seeOptionIsSelected()
* @see
Codeception\Util\
Mink::seeOptionIsSelected()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeOptionIsSelected
(
$select
,
$text
)
{
$this
->
scenario
->
a
ssertion
(
'seeOptionIsSelected'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeOptionIsSelected'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -974,6 +1650,10 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks if option is not selected in select field.
*
* ``` php
...
...
@@ -985,43 +1665,39 @@ class WebGuy extends \Codeception\AbstractGuy
* @param $selector
* @param $optionText
* @return mixed
* @see Mink::dontSeeOptionIsSelected()
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Mink::dontSeeOptionIsSelected()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
do
ntSeeOptionIsSelected
(
$select
,
$text
)
{
$this
->
scenario
->
a
ction
(
'dontSeeOptionIsSelected'
,
func_get_args
(
));
public
function
ca
ntSeeOptionIsSelected
(
$select
,
$text
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeOptionIsSelected'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* Assert if the specified checkbox is checked.
* Use css selector or xpath to match.
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
*
Example:
*
Checks if option is not selected in select field.
*
* ``` 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]');
*
* $I->dontSeeOptionIsSelected('#form input[name=payment]', 'Visa');
* ?>
* ```
*
* @param $checkbox
* @see Mink::seeCheckboxIsChecked()
* @param $selector
* @param $optionText
* @return mixed
* @see Codeception\Util\Mink::dontSeeOptionIsSelected()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeCheckboxIsChecked
(
$checkbox
)
{
$this
->
scenario
->
a
ssertion
(
'seeCheckboxIsChecked'
,
func_get_args
(
));
public
function
dontSeeOptionIsSelected
(
$select
,
$text
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSeeOptionIsSelected'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -1031,35 +1707,44 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* Assert if the specified checkbox is unchecked.
* Use css selector or xpath to match.
* This 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->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.
*
* $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');
* ?>
* ```
*
* @param $checkbox
* @see Mink::dontSeeCheckboxIsChecked()
* @param $field
* @param $value
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Mink::seeInField()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSeeCheckboxIsChecked
(
$checkbox
)
{
$this
->
scenario
->
a
ction
(
'dontSeeCheckboxIsChecked'
,
func_get_args
(
));
public
function
canSeeInField
(
$field
,
$value
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeInField'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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
*
...
...
@@ -1077,13 +1762,11 @@ class WebGuy extends \Codeception\AbstractGuy
*
* @param $field
* @param $value
* @see Mink::seeInField()
* @see
Codeception\Util\
Mink::seeInField()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeInField
(
$field
,
$value
)
{
$this
->
scenario
->
a
ssertion
(
'seeInField'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeInField'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -1093,6 +1776,43 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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');
* ?>
* ```
*
* @param $field
* @param $value
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Mink::dontSeeInField()
* @return \Codeception\Maybe
*/
public
function
cantSeeInField
(
$field
,
$value
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeInField'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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:
...
...
@@ -1109,13 +1829,11 @@ class WebGuy extends \Codeception\AbstractGuy
*
* @param $field
* @param $value
* @see Mink::dontSeeInField()
* @see
Codeception\Util\
Mink::dontSeeInField()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSeeInField
(
$field
,
$value
)
{
$this
->
scenario
->
a
ction
(
'dontSeeInField'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSeeInField'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -1125,6 +1843,10 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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.
*
...
...
@@ -1140,13 +1862,11 @@ class WebGuy extends \Codeception\AbstractGuy
*
* @param $cssOrXPathOrRegex
* @return mixed
* @see Mink::grabTextFrom()
* @see
Codeception\Util\
Mink::grabTextFrom()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
grabTextFrom
(
$cssOrXPathOrRegex
)
{
$this
->
scenario
->
a
ction
(
'grabTextFrom'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'grabTextFrom'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -1156,6 +1876,10 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Finds and returns field and returns it's value.
* Searches by field name, then by CSS, then by XPath
*
...
...
@@ -1171,13 +1895,66 @@ class WebGuy extends \Codeception\AbstractGuy
*
* @param $field
* @return mixed
* @see Mink::grabValueFrom()
* @see
Codeception\Util\
Mink::grabValueFrom()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
grabValueFrom
(
$field
)
{
$this
->
scenario
->
action
(
'grabValueFrom'
,
func_get_args
());
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Action
(
'grabValueFrom'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Mink::seeInTitle()
* @return \Codeception\Maybe
*/
public
function
canSeeInTitle
(
$title
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeInTitle'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Mink::seeInTitle()
* @return \Codeception\Maybe
*/
public
function
seeInTitle
(
$title
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Assertion
(
'seeInTitle'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -1187,14 +1964,40 @@ class WebGuy extends \Codeception\AbstractGuy
/**
* This 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\Util\Mink::dontSeeInTitle()
* @return \Codeception\Maybe
*/
public
function
cantSeeInTitle
(
$title
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeInTitle'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* @see Mink::grabAttribute()
* Checks that page title does not contain text.
*
* @param $title
* @return mixed
* @see Codeception\Util\Mink::dontSeeInTitle()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
grabAttribute
(
)
{
$this
->
scenario
->
a
ction
(
'grabAttribute'
,
func_get_args
(
));
public
function
dontSeeInTitle
(
$title
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSeeInTitle'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
apps/basic/tests/functional/TestGuy.php
View file @
8775e25c
...
...
@@ -18,24 +18,30 @@ use Codeception\Module\Yii2;
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($role)
* @method void lookForwardTo($achieveValue)
* @method void offsetGet($offset)
* @method void offsetSet($offset, $value)
* @method void offsetExists($offset)
* @method void offsetUnset($offset)
*/
class
TestGuy
extends
\Codeception\AbstractGuy
{
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Enters a directory In local filesystem.
* Project root directory is used by default
*
* @param $path
* @see Filesystem::amInPath()
* @see
Codeception\Module\
Filesystem::amInPath()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
amInPath
(
$path
)
{
$this
->
scenario
->
condition
(
'amInPath'
,
func_get_args
(
));
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Condition
(
'amInPath'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -45,6 +51,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Opens a file and stores it's content.
*
* Usage:
...
...
@@ -57,13 +67,11 @@ class TestGuy extends \Codeception\AbstractGuy
* ```
*
* @param $filename
* @see Filesystem::openFile()
* @see
Codeception\Module\
Filesystem::openFile()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
openFile
(
$filename
)
{
$this
->
scenario
->
a
ction
(
'openFile'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'openFile'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -73,6 +81,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Deletes a file
*
* ``` php
...
...
@@ -82,13 +94,11 @@ class TestGuy extends \Codeception\AbstractGuy
* ```
*
* @param $filename
* @see Filesystem::deleteFile()
* @see
Codeception\Module\
Filesystem::deleteFile()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
deleteFile
(
$filename
)
{
$this
->
scenario
->
a
ction
(
'deleteFile'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'deleteFile'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -98,6 +108,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Deletes directory with all subdirectories
*
* ``` php
...
...
@@ -107,13 +121,11 @@ class TestGuy extends \Codeception\AbstractGuy
* ```
*
* @param $dirname
* @see Filesystem::deleteDir()
* @see
Codeception\Module\
Filesystem::deleteDir()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
deleteDir
(
$dirname
)
{
$this
->
scenario
->
a
ction
(
'deleteDir'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'deleteDir'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -123,6 +135,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Copies directory with all contents
*
* ``` php
...
...
@@ -133,13 +149,11 @@ class TestGuy extends \Codeception\AbstractGuy
*
* @param $src
* @param $dst
* @see Filesystem::copyDir()
* @see
Codeception\Module\
Filesystem::copyDir()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
copyDir
(
$src
,
$dst
)
{
$this
->
scenario
->
a
ction
(
'copyDir'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'copyDir'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -149,6 +163,39 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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()
* @return \Codeception\Maybe
*/
public
function
canSeeInThisFile
(
$text
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeInThisFile'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks If opened file has `text` in it.
*
* Usage:
...
...
@@ -161,13 +208,11 @@ class TestGuy extends \Codeception\AbstractGuy
* ```
*
* @param $text
* @see Filesystem::seeInThisFile()
* @see
Codeception\Module\
Filesystem::seeInThisFile()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeInThisFile
(
$text
)
{
$this
->
scenario
->
a
ssertion
(
'seeInThisFile'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeInThisFile'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -177,6 +222,40 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks the strict matching of file contents.
* Unlike `seeInThisFile` will fail if file has something more then 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()
* @return \Codeception\Maybe
*/
public
function
canSeeFileContentsEqual
(
$text
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeFileContentsEqual'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks the strict matching of file contents.
* Unlike `seeInThisFile` will fail if file has something more then expected lines.
* Better to use with HEREDOC strings.
...
...
@@ -190,13 +269,11 @@ class TestGuy extends \Codeception\AbstractGuy
* ```
*
* @param $text
* @see Filesystem::seeFileContentsEqual()
* @see
Codeception\Module\
Filesystem::seeFileContentsEqual()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeFileContentsEqual
(
$text
)
{
$this
->
scenario
->
a
ssertion
(
'seeFileContentsEqual'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeFileContentsEqual'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -206,23 +283,52 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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->seeInThisFile('codeception/codeception');
* $I->dontSeeInThisFile('codeception/codeception');
* ?>
* ```
*
* @param $text
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Module\Filesystem::dontSeeInThisFile()
* @return \Codeception\Maybe
*/
public
function
cantSeeInThisFile
(
$text
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeInThisFile'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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 Filesystem::dontSeeInThisFile()
* @see
Codeception\Module\
Filesystem::dontSeeInThisFile()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSeeInThisFile
(
$text
)
{
$this
->
scenario
->
a
ction
(
'dontSeeInThisFile'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSeeInThisFile'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -232,14 +338,16 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Deletes a file
* @see Filesystem::deleteThisFile()
* @see
Codeception\Module\
Filesystem::deleteThisFile()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
deleteThisFile
()
{
$this
->
scenario
->
a
ction
(
'deleteThisFile'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'deleteThisFile'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -249,6 +357,38 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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()
* @return \Codeception\Maybe
*/
public
function
canSeeFileFound
(
$filename
,
$path
=
null
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeFileFound'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks if file exists in path.
* Opens a file when it's exists
*
...
...
@@ -260,13 +400,11 @@ class TestGuy extends \Codeception\AbstractGuy
*
* @param $filename
* @param string $path
* @see Filesystem::seeFileFound()
* @see
Codeception\Module\
Filesystem::seeFileFound()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeFileFound
(
$filename
,
$path
=
null
)
{
$this
->
scenario
->
a
ssertion
(
'seeFileFound'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeFileFound'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -276,6 +414,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Erases directory contents
*
* ``` php
...
...
@@ -285,13 +427,11 @@ class TestGuy extends \Codeception\AbstractGuy
* ```
*
* @param $dirname
* @see Filesystem::cleanDir()
* @see
Codeception\Module\
Filesystem::cleanDir()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
cleanDir
(
$dirname
)
{
$this
->
scenario
->
a
ction
(
'cleanDir'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'cleanDir'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -301,17 +441,19 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* Adds HTTP authentication via username/password.
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Authenticates user for HTTP_AUTH
*
* @param $username
* @param $password
* @see Framework::amHttpAuthenticated()
* @see
Codeception\Util\
Framework::amHttpAuthenticated()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
amHttpAuthenticated
(
$username
,
$password
)
{
$this
->
scenario
->
condition
(
'amHttpAuthenticated'
,
func_get_args
(
));
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Condition
(
'amHttpAuthenticated'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -321,6 +463,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Opens the page.
* Requires relative uri as parameter
*
...
...
@@ -336,13 +482,11 @@ class TestGuy extends \Codeception\AbstractGuy
* ```
*
* @param $page
* @see Framework::amOnPage()
* @see
Codeception\Util\
Framework::amOnPage()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
amOnPage
(
$page
)
{
$this
->
scenario
->
condition
(
'amOnPage'
,
func_get_args
(
));
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Condition
(
'amOnPage'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -352,6 +496,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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.
...
...
@@ -380,13 +528,11 @@ class TestGuy extends \Codeception\AbstractGuy
* ```
* @param $link
* @param $context
* @see Framework::click()
* @see
Codeception\Util\
Framework::click()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
click
(
$link
,
$context
=
null
)
{
$this
->
scenario
->
a
ction
(
'click'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'click'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -396,6 +542,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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.
*
...
...
@@ -406,18 +556,48 @@ class TestGuy extends \Codeception\AbstractGuy
* $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\Util\Framework::see()
* @return \Codeception\Maybe
*/
public
function
canSee
(
$text
,
$selector
=
null
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'see'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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 Framework::see()
* @see
Codeception\Util\
Framework::see()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
see
(
$text
,
$selector
=
null
)
{
$this
->
scenario
->
a
ssertion
(
'see'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'see'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -427,6 +607,42 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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\Util\Framework::dontSee()
* @return \Codeception\Maybe
*/
public
function
cantSee
(
$text
,
$selector
=
null
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSee'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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.
*
...
...
@@ -437,17 +653,16 @@ class TestGuy extends \Codeception\AbstractGuy
* $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 Framework::dontSee()
* @see
Codeception\Util\
Framework::dontSee()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSee
(
$text
,
$selector
=
null
)
{
$this
->
scenario
->
a
ction
(
'dontSee'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSee'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -457,6 +672,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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.
*
...
...
@@ -466,18 +685,47 @@ class TestGuy extends \Codeception\AbstractGuy
* <?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\Util\Framework::seeLink()
* @return \Codeception\Maybe
*/
public
function
canSeeLink
(
$text
,
$url
=
null
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeLink'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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 Framework::seeLink()
* @see
Codeception\Util\
Framework::seeLink()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeLink
(
$text
,
$url
=
null
)
{
$this
->
scenario
->
a
ssertion
(
'seeLink'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeLink'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -487,6 +735,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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.
*
...
...
@@ -495,46 +747,46 @@ class TestGuy extends \Codeception\AbstractGuy
* ``` php
* <?php
* $I->dontSeeLink('Logout'); // I suppose user is not logged in
*
*
?>
* ```
*
* @param $text
* @param null $url
* @see Framework::dontSeeLink()
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Framework::dontSeeLink()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
do
ntSeeLink
(
$text
,
$url
=
null
)
{
$this
->
scenario
->
a
ction
(
'dontSeeLink'
,
func_get_args
(
));
public
function
ca
ntSeeLink
(
$text
,
$url
=
null
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeLink'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* Checks that current uri contains a value
* This 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
* // to match: /home/dashboard
* $I->seeInCurrentUrl('home');
* // to match: /users/1
* $I->seeInCurrentUrl('/users/');
* $I->dontSeeLink('Logout'); // I suppose user is not logged in
* ?>
* ```
*
* @param $uri
* @see Framework::seeInCurrentUrl()
* @param $text
* @param null $url
* @see Codeception\Util\Framework::dontSeeLink()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeInCurrentUrl
(
$uri
)
{
$this
->
scenario
->
a
ssertion
(
'seeInCurrentUrl'
,
func_get_args
(
));
public
function
dontSeeLink
(
$text
,
$url
=
null
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSeeLink'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -544,47 +796,56 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* Checks that current uri does not contain a value
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks that current uri contains a value
*
* ``` php
* <?php
* $I->dontSeeInCurrentUrl('/users/');
* // to match: /home/dashboard
* $I->seeInCurrentUrl('home');
* // to match: /users/1
* $I->seeInCurrentUrl('/users/');
* ?>
* ```
*
* @param $uri
* @see Framework::dontSeeInCurrentUrl()
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Framework::seeInCurrentUrl()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dont
SeeInCurrentUrl
(
$uri
)
{
$this
->
scenario
->
a
ction
(
'dontSeeInCurrentUrl'
,
func_get_args
(
));
public
function
can
SeeInCurrentUrl
(
$uri
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeInCurrentUrl'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* Checks that current url is equal to value.
* Unlike `seeInCurrentUrl` performs a strict check.
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks that current uri contains a value
*
* ``` php
* <?php
* // to match root url
* $I->seeCurrentUrlEquals('/');
* // to match: /home/dashboard
* $I->seeInCurrentUrl('home');
* // to match: /users/1
* $I->seeInCurrentUrl('/users/');
* ?>
* ```
*
* @param $uri
* @see
Framework::seeCurrentUrlEquals
()
* @see
Codeception\Util\Framework::seeInCurrentUrl
()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
see
CurrentUrlEquals
(
$uri
)
{
$this
->
scenario
->
a
ssertion
(
'seeCurrentUrlEquals'
,
func_get_args
(
));
public
function
see
InCurrentUrl
(
$uri
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeInCurrentUrl'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -594,46 +855,50 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* Checks that current url is not equal to value.
* Unlike `dontSeeInCurrentUrl` performs a strict check.
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks that current uri does not contain a value
*
* ``` php
* <?php
* // current url is not root
* $I->dontSeeCurrentUrlEquals('/');
* $I->dontSeeInCurrentUrl('/users/');
* ?>
* ```
*
* @param $uri
* @see Framework::dontSeeCurrentUrlEquals()
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Framework::dontSeeInCurrentUrl()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSeeCurrentUrlEquals
(
$uri
)
{
$this
->
scenario
->
a
ction
(
'dontSeeCurrentUrlEquals'
,
func_get_args
(
));
public
function
cantSeeInCurrentUrl
(
$uri
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeInCurrentUrl'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* Checks that current url is matches a RegEx value
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks that current uri does not contain a value
*
* ``` php
* <?php
* // to match root url
* $I->seeCurrentUrlMatches('~$/users/(\d+)~');
* $I->dontSeeInCurrentUrl('/users/');
* ?>
* ```
*
* @param $uri
* @see
Framework::seeCurrentUrlMatches
()
* @see
Codeception\Util\Framework::dontSeeInCurrentUrl
()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeCurrentUrlMatches
(
$uri
)
{
$this
->
scenario
->
a
ssertion
(
'seeCurrentUrlMatches'
,
func_get_args
(
));
public
function
dontSeeInCurrentUrl
(
$uri
)
{
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSeeInCurrentUrl'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -643,21 +908,166 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* Checks that current url does not match a RegEx value
* This 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->
dontSeeCurrentUrlMatches('~$/users/(\d+)~
');
* $I->
seeCurrentUrlEquals('/
');
* ?>
* ```
*
* @param $uri
* @see Framework::dontSeeCurrentUrlMatches()
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Framework::seeCurrentUrlEquals()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSeeCurrentUrlMatches
(
$uri
)
{
$this
->
scenario
->
action
(
'dontSeeCurrentUrlMatches'
,
func_get_args
());
public
function
canSeeCurrentUrlEquals
(
$uri
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeCurrentUrlEquals'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Framework::seeCurrentUrlEquals()
* @return \Codeception\Maybe
*/
public
function
seeCurrentUrlEquals
(
$uri
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Assertion
(
'seeCurrentUrlEquals'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Framework::dontSeeCurrentUrlEquals()
* @return \Codeception\Maybe
*/
public
function
cantSeeCurrentUrlEquals
(
$uri
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeCurrentUrlEquals'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Framework::dontSeeCurrentUrlEquals()
* @return \Codeception\Maybe
*/
public
function
dontSeeCurrentUrlEquals
(
$uri
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Assertion
(
'dontSeeCurrentUrlEquals'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Framework::seeCurrentUrlMatches()
* @return \Codeception\Maybe
*/
public
function
canSeeCurrentUrlMatches
(
$uri
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeCurrentUrlMatches'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Framework::seeCurrentUrlMatches()
* @return \Codeception\Maybe
*/
public
function
seeCurrentUrlMatches
(
$uri
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Assertion
(
'seeCurrentUrlMatches'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -667,6 +1077,65 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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\Util\Framework::dontSeeCurrentUrlMatches()
* @return \Codeception\Maybe
*/
public
function
cantSeeCurrentUrlMatches
(
$uri
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeCurrentUrlMatches'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Framework::dontSeeCurrentUrlMatches()
* @return \Codeception\Maybe
*/
public
function
dontSeeCurrentUrlMatches
(
$uri
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Assertion
(
'dontSeeCurrentUrlMatches'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Takes a parameters from current URI by RegEx.
* If no url provided returns full URI.
*
...
...
@@ -680,13 +1149,11 @@ class TestGuy extends \Codeception\AbstractGuy
* @param null $uri
* @internal param $url
* @return mixed
* @see Framework::grabFromCurrentUrl()
* @see
Codeception\Util\
Framework::grabFromCurrentUrl()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
grabFromCurrentUrl
(
$uri
=
null
)
{
$this
->
scenario
->
a
ction
(
'grabFromCurrentUrl'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'grabFromCurrentUrl'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -696,6 +1163,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Assert if the specified checkbox is checked.
* Use css selector or xpath to match.
*
...
...
@@ -706,17 +1177,46 @@ class TestGuy extends \Codeception\AbstractGuy
* $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\Util\Framework::seeCheckboxIsChecked()
* @return \Codeception\Maybe
*/
public
function
canSeeCheckboxIsChecked
(
$checkbox
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeCheckboxIsChecked'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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 Framework::seeCheckboxIsChecked()
* @see
Codeception\Util\
Framework::seeCheckboxIsChecked()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeCheckboxIsChecked
(
$checkbox
)
{
$this
->
scenario
->
a
ssertion
(
'seeCheckboxIsChecked'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeCheckboxIsChecked'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -726,6 +1226,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Assert if the specified checkbox is unchecked.
* Use css selector or xpath to match.
*
...
...
@@ -735,17 +1239,45 @@ class TestGuy extends \Codeception\AbstractGuy
* <?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\Util\Framework::dontSeeCheckboxIsChecked()
* @return \Codeception\Maybe
*/
public
function
cantSeeCheckboxIsChecked
(
$checkbox
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeCheckboxIsChecked'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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 Framework::dontSeeCheckboxIsChecked()
* @see
Codeception\Util\
Framework::dontSeeCheckboxIsChecked()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSeeCheckboxIsChecked
(
$checkbox
)
{
$this
->
scenario
->
a
ction
(
'dontSeeCheckboxIsChecked'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSeeCheckboxIsChecked'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -755,6 +1287,44 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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');
* ?>
* ```
*
* @param $field
* @param $value
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Framework::seeInField()
* @return \Codeception\Maybe
*/
public
function
canSeeInField
(
$field
,
$value
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeInField'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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
*
...
...
@@ -772,13 +1342,11 @@ class TestGuy extends \Codeception\AbstractGuy
*
* @param $field
* @param $value
* @see Framework::seeInField()
* @see
Codeception\Util\
Framework::seeInField()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeInField
(
$field
,
$value
)
{
$this
->
scenario
->
a
ssertion
(
'seeInField'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeInField'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -788,6 +1356,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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:
...
...
@@ -804,13 +1376,44 @@ class TestGuy extends \Codeception\AbstractGuy
*
* @param $field
* @param $value
* @see Framework::dontSeeInField()
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Framework::dontSeeInField()
* @return \Codeception\Maybe
*/
public
function
cantSeeInField
(
$field
,
$value
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeInField'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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');
* ?>
* ```
*
* @param $field
* @param $value
* @see Codeception\Util\Framework::dontSeeInField()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSeeInField
(
$field
,
$value
)
{
$this
->
scenario
->
a
ction
(
'dontSeeInField'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSeeInField'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -820,6 +1423,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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.
...
...
@@ -832,7 +1439,7 @@ class TestGuy extends \Codeception\AbstractGuy
*
* ``` php
* <?php
* $I->submitForm('#login',
['login' => 'davert', 'password' => '123456']
);
* $I->submitForm('#login',
array('login' => 'davert', 'password' => '123456')
);
*
* ```
*
...
...
@@ -851,20 +1458,18 @@ class TestGuy extends \Codeception\AbstractGuy
*
* ``` php
* <?php
* $I->submitForm('#userForm',
['user' => ['login' => 'Davert', 'password' => '123456', 'agree' => true]]
);
* $I->submitForm('#userForm',
array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true))
);
*
* ```
* Note, that pricing plan will be set to Paid, as it's selected on page.
*
* @param $selector
* @param $params
* @see Framework::submitForm()
* @see
Codeception\Util\
Framework::submitForm()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
submitForm
(
$selector
,
$params
)
{
$this
->
scenario
->
a
ction
(
'submitForm'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'submitForm'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -874,17 +1479,27 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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!");
* ?>
* ```
*
* @param $field
* @param $value
* @see Framework::fillField()
* @see
Codeception\Util\
Framework::fillField()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
fillField
(
$field
,
$value
)
{
$this
->
scenario
->
a
ction
(
'fillField'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'fillField'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -894,6 +1509,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Selects an option in select tag or in radio button group.
*
* Example:
...
...
@@ -906,15 +1525,21 @@ class TestGuy extends \Codeception\AbstractGuy
* ?>
* ```
*
* 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 Framework::selectOption()
* @see
Codeception\Util\
Framework::selectOption()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
selectOption
(
$select
,
$option
)
{
$this
->
scenario
->
a
ction
(
'selectOption'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'selectOption'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -924,6 +1549,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Ticks a checkbox.
* For radio buttons use `selectOption` method.
*
...
...
@@ -936,13 +1565,11 @@ class TestGuy extends \Codeception\AbstractGuy
* ```
*
* @param $option
* @see Framework::checkOption()
* @see
Codeception\Util\
Framework::checkOption()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
checkOption
(
$option
)
{
$this
->
scenario
->
a
ction
(
'checkOption'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'checkOption'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -952,6 +1579,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Unticks a checkbox.
*
* Example:
...
...
@@ -963,13 +1594,11 @@ class TestGuy extends \Codeception\AbstractGuy
* ```
*
* @param $option
* @see Framework::uncheckOption()
* @see
Codeception\Util\
Framework::uncheckOption()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
uncheckOption
(
$option
)
{
$this
->
scenario
->
a
ction
(
'uncheckOption'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'uncheckOption'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -979,26 +1608,28 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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/test
s.xls'
* $I->attachFile('prices.xls');
* // file is stored in 'tests/
_data/price
s.xls'
* $I->attachFile('
input[@type="file"]', '
prices.xls');
* ?>
* ```
*
* @param $field
* @param $filename
* @see Framework::attachFile()
* @see
Codeception\Util\
Framework::attachFile()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
attachFile
(
$field
,
$filename
)
{
$this
->
scenario
->
a
ction
(
'attachFile'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'attachFile'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -1008,6 +1639,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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.
*
...
...
@@ -1015,13 +1650,11 @@ class TestGuy extends \Codeception\AbstractGuy
*
* @param $uri
* @param $params
* @see Framework::sendAjaxGetRequest()
* @see
Codeception\Util\
Framework::sendAjaxGetRequest()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
sendAjaxGetRequest
(
$uri
,
$params
=
null
)
{
$this
->
scenario
->
a
ction
(
'sendAjaxGetRequest'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'sendAjaxGetRequest'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -1031,6 +1664,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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.
...
...
@@ -1042,20 +1679,18 @@ class TestGuy extends \Codeception\AbstractGuy
*
* ``` php
* <?php
* $I->sendAjaxPostRequest('/updateSettings',
['notifications' => true]
; // POST
* $I->sendAjaxGetRequest('/updateSettings',
['notifications' => true]
; // GET
* $I->sendAjaxPostRequest('/updateSettings',
array('notifications' => true)
; // POST
* $I->sendAjaxGetRequest('/updateSettings',
array('notifications' => true)
; // GET
*
* ```
*
* @param $uri
* @param $params
* @see Framework::sendAjaxPostRequest()
* @see
Codeception\Util\
Framework::sendAjaxPostRequest()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
sendAjaxPostRequest
(
$uri
,
$params
=
null
)
{
$this
->
scenario
->
a
ction
(
'sendAjaxPostRequest'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'sendAjaxPostRequest'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -1065,23 +1700,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* @see Framework::formatResponse()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
formatResponse
(
$response
)
{
$this
->
scenario
->
action
(
'formatResponse'
,
func_get_args
());
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* Finds and returns text contents of element.
* Element is searched by CSS selector, XPath or matcher by regex.
*
...
...
@@ -1097,13 +1719,11 @@ class TestGuy extends \Codeception\AbstractGuy
*
* @param $cssOrXPathOrRegex
* @return mixed
* @see Framework::grabTextFrom()
* @see
Codeception\Util\
Framework::grabTextFrom()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
grabTextFrom
(
$cssOrXPathOrRegex
)
{
$this
->
scenario
->
a
ction
(
'grabTextFrom'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'grabTextFrom'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -1113,6 +1733,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Finds and returns field and returns it's value.
* Searches by field name, then by CSS, then by XPath
*
...
...
@@ -1128,13 +1752,11 @@ class TestGuy extends \Codeception\AbstractGuy
*
* @param $field
* @return mixed
* @see Framework::grabValueFrom()
* @see
Codeception\Util\
Framework::grabValueFrom()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
grabValueFrom
(
$field
)
{
$this
->
scenario
->
a
ction
(
'grabValueFrom'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Action
(
'grabValueFrom'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -1144,22 +1766,50 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks if element exists on a page, matching it by CSS or XPath
*
* ``` php
* <?php
* $I->seeElement('.error');
* $I->seeElement(
//form/input[1]
);
* $I->seeElement(
'//form/input[1]'
);
* ?>
* ```
* @param $selector
* @see Framework::seeElement()
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Framework::seeElement()
* @return \Codeception\Maybe
*/
public
function
canSeeElement
(
$selector
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeElement'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks if element exists on a page, matching it by CSS or XPath
*
* ``` php
* <?php
* $I->seeElement('.error');
* $I->seeElement('//form/input[1]');
* ?>
* ```
* @param $selector
* @see Codeception\Util\Framework::seeElement()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeElement
(
$selector
)
{
$this
->
scenario
->
a
ssertion
(
'seeElement'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeElement'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -1169,22 +1819,54 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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
*
* Example:
*
* ``` php
* <?php
* $I->dontSeeElement('.error');
* $I->dontSeeElement('//form/input[1]');
* ?>
* ```
* @param $selector
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Framework::dontSeeElement()
* @return \Codeception\Maybe
*/
public
function
cantSeeElement
(
$selector
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeElement'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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
*
* Example:
*
* ``` php
* <?php
* $I->dontSeeElement('.error');
* $I->dontSeeElement(
//form/input[1]
);
* $I->dontSeeElement(
'//form/input[1]'
);
* ?>
* ```
* @param $selector
* @see Framework::dontSeeElement()
* @see
Codeception\Util\
Framework::dontSeeElement()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSeeElement
(
$selector
)
{
$this
->
scenario
->
a
ction
(
'dontSeeElement'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSeeElement'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -1194,6 +1876,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks if option is selected in select field.
*
* ``` php
...
...
@@ -1205,13 +1891,39 @@ class TestGuy extends \Codeception\AbstractGuy
* @param $selector
* @param $optionText
* @return mixed
* @see Framework::seeOptionIsSelected()
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Framework::seeOptionIsSelected()
* @return \Codeception\Maybe
*/
public
function
canSeeOptionIsSelected
(
$select
,
$optionText
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeOptionIsSelected'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Framework::seeOptionIsSelected()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeOptionIsSelected
(
$select
,
$optionText
)
{
$this
->
scenario
->
a
ssertion
(
'seeOptionIsSelected'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seeOptionIsSelected'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -1221,6 +1933,10 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks if option is not selected in select field.
*
* ``` php
...
...
@@ -1232,13 +1948,39 @@ class TestGuy extends \Codeception\AbstractGuy
* @param $selector
* @param $optionText
* @return mixed
* @see Framework::dontSeeOptionIsSelected()
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Framework::dontSeeOptionIsSelected()
* @return \Codeception\Maybe
*/
public
function
cantSeeOptionIsSelected
(
$select
,
$optionText
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeOptionIsSelected'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Framework::dontSeeOptionIsSelected()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
dontSeeOptionIsSelected
(
$select
,
$optionText
)
{
$this
->
scenario
->
a
ction
(
'dontSeeOptionIsSelected'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'dontSeeOptionIsSelected'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -1248,14 +1990,34 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This 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\Util\Framework::seePageNotFound()
* @return \Codeception\Maybe
*/
public
function
canSeePageNotFound
()
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seePageNotFound'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Asserts that current page has 404 response status code.
* @see Framework::seePageNotFound()
* @see
Codeception\Util\
Framework::seePageNotFound()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seePageNotFound
()
{
$this
->
scenario
->
a
ssertion
(
'seePageNotFound'
,
func_get_args
(
));
$this
->
scenario
->
a
ddStep
(
new
\Codeception\Step\Assertion
(
'seePageNotFound'
,
func_get_args
()
));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
@@ -1265,17 +2027,138 @@ class TestGuy extends \Codeception\AbstractGuy
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks that response code is equal to value provided.
*
* @param $code
* @return mixed
* @see Framework::seeResponseCodeIs()
* Conditional Assertion: Test won't be stopped on fail
* @see Codeception\Util\Framework::seeResponseCodeIs()
* @return \Codeception\Maybe
*/
public
function
canSeeResponseCodeIs
(
$code
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeResponseCodeIs'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks that response code is equal to value provided.
*
* @param $code
* @return mixed
* @see Codeception\Util\Framework::seeResponseCodeIs()
* @return \Codeception\Maybe
* ! This method is generated. DO NOT EDIT. !
* ! Documentation taken from corresponding module !
*/
public
function
seeResponseCodeIs
(
$code
)
{
$this
->
scenario
->
assertion
(
'seeResponseCodeIs'
,
func_get_args
());
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Assertion
(
'seeResponseCodeIs'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Framework::seeInTitle()
* @return \Codeception\Maybe
*/
public
function
canSeeInTitle
(
$title
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'seeInTitle'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Framework::seeInTitle()
* @return \Codeception\Maybe
*/
public
function
seeInTitle
(
$title
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Assertion
(
'seeInTitle'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This 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\Util\Framework::dontSeeInTitle()
* @return \Codeception\Maybe
*/
public
function
cantSeeInTitle
(
$title
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\ConditionalAssertion
(
'dontSeeInTitle'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
}
return
new
Maybe
();
}
/**
* This method is generated.
* Documentation taken from corresponding module.
* ----------------------------------------------
*
* Checks that page title does not contain text.
*
* @param $title
* @return mixed
* @see Codeception\Util\Framework::dontSeeInTitle()
* @return \Codeception\Maybe
*/
public
function
dontSeeInTitle
(
$title
)
{
$this
->
scenario
->
addStep
(
new
\Codeception\Step\Assertion
(
'dontSeeInTitle'
,
func_get_args
()));
if
(
$this
->
scenario
->
running
())
{
$result
=
$this
->
scenario
->
runStep
();
return
new
Maybe
(
$result
);
...
...
apps/basic/tests/unit/CodeGuy.php
View file @
8775e25c
<?php
// This class was automatically generated by build task
// You
can change it manually, but
it will be overwritten on next build
// You
should not change it manually as
it will be overwritten on next build
// @codingStandardsIgnoreFile
use
Codeception\Maybe
;
use
\Codeception\Maybe
;
use
Codeception\Module\CodeHelper
;
/**
* Inherited methods
* @method void execute($callable)
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void amTesting($method)
* @method void amTestingMethod($method)
* @method void testMethod($signature)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($role)
* @method void lookForwardTo($achieveValue)
* @method void offsetGet($offset)
* @method void offsetSet($offset, $value)
* @method void offsetExists($offset)
* @method void offsetUnset($offset)
*/
class
CodeGuy
extends
\Codeception\AbstractGuy
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment