PHP Класс WebGuy

Наследование: extends Codeception\Actor
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
amBearerAuthenticated ( $accessToken ) [!] Method is generated. Documentation taken from corresponding module.
amDigestAuthenticated ( $username, $password ) [!] Method is generated. Documentation taken from corresponding module.
amHttpAuthenticated ( $username, $password ) [!] Method is generated. Documentation taken from corresponding module.
amOnPage ( $page ) [!] Method is generated. Documentation taken from corresponding module.
amOnSubdomain ( $subdomain ) : mixed [!] Method is generated. Documentation taken from corresponding module.
amOnUrl ( $url ) [!] Method is generated. Documentation taken from corresponding module.
attachFile ( $field, $filename ) [!] Method is generated. Documentation taken from corresponding module.
canSee ( $text, null $selector = null ) [!] Method is generated. Documentation taken from corresponding module.
canSeeCheckboxIsChecked ( $checkbox ) [!] Method is generated. Documentation taken from corresponding module.
canSeeCookie ( $name ) : mixed [!] Method is generated. Documentation taken from corresponding module.
canSeeCurrentUrlEquals ( $uri ) [!] Method is generated. Documentation taken from corresponding module.
canSeeCurrentUrlMatches ( $uri ) [!] Method is generated. Documentation taken from corresponding module.
canSeeElement ( $selector, array $attributes = null ) [!] Method is generated. Documentation taken from corresponding module.
canSeeHttpHeader ( $name, $value = null ) [!] Method is generated. Documentation taken from corresponding module.
canSeeHttpHeaderOnce ( $name ) [!] Method is generated. Documentation taken from corresponding module.
canSeeInCurrentUrl ( $uri ) [!] Method is generated. Documentation taken from corresponding module.
canSeeInField ( $field, $value ) [!] Method is generated. Documentation taken from corresponding module.
canSeeInTitle ( $title ) : mixed [!] Method is generated. Documentation taken from corresponding module.
canSeeLink ( $text, null $url = null ) [!] Method is generated. Documentation taken from corresponding module.
canSeeNumberOfElements ( $selector, $expected ) [!] Method is generated. Documentation taken from corresponding module.
canSeeOptionIsSelected ( $select, $optionText ) : mixed [!] Method is generated. Documentation taken from corresponding module.
canSeePageNotFound ( ) [!] Method is generated. Documentation taken from corresponding module.
canSeeResponseCodeIs ( $code ) [!] Method is generated. Documentation taken from corresponding module.
canSeeResponseContains ( $text ) [!] Method is generated. Documentation taken from corresponding module.
canSeeResponseContainsJson ( array $json = null ) [!] Method is generated. Documentation taken from corresponding module.
canSeeResponseEquals ( $response ) [!] Method is generated. Documentation taken from corresponding module.
canSeeResponseIsJson ( ) [!] Method is generated. Documentation taken from corresponding module.
canSeeResponseIsXml ( ) [!] Method is generated. Documentation taken from corresponding module.
canSeeResponseJsonMatchesJsonPath ( $jsonPath ) [!] Method is generated. Documentation taken from corresponding module.
canSeeResponseJsonMatchesXpath ( $xpath ) [!] Method is generated. Documentation taken from corresponding module.
cantSee ( $text, null $selector = null ) [!] Method is generated. Documentation taken from corresponding module.
cantSeeCheckboxIsChecked ( $checkbox ) [!] Method is generated. Documentation taken from corresponding module.
cantSeeCookie ( $name ) : mixed [!] Method is generated. Documentation taken from corresponding module.
cantSeeCurrentUrlEquals ( $uri ) [!] Method is generated. Documentation taken from corresponding module.
cantSeeCurrentUrlMatches ( $uri ) [!] Method is generated. Documentation taken from corresponding module.
cantSeeElement ( $selector, array $attributes = null ) [!] Method is generated. Documentation taken from corresponding module.
cantSeeHttpHeader ( $name, $value = null ) [!] Method is generated. Documentation taken from corresponding module.
cantSeeInCurrentUrl ( $uri ) [!] Method is generated. Documentation taken from corresponding module.
cantSeeInField ( $field, $value ) [!] Method is generated. Documentation taken from corresponding module.
cantSeeInTitle ( $title ) : mixed [!] Method is generated. Documentation taken from corresponding module.
cantSeeLink ( $text, null $url = null ) [!] Method is generated. Documentation taken from corresponding module.
cantSeeOptionIsSelected ( $select, $optionText ) : mixed [!] Method is generated. Documentation taken from corresponding module.
cantSeeResponseCodeIs ( $code ) [!] Method is generated. Documentation taken from corresponding module.
cantSeeResponseContains ( $text ) [!] Method is generated. Documentation taken from corresponding module.
cantSeeResponseContainsJson ( array $json = null ) [!] Method is generated. Documentation taken from corresponding module.
checkOption ( $option ) [!] Method is generated. Documentation taken from corresponding module.
click ( $link, $context = null ) [!] Method is generated. Documentation taken from corresponding module.
dontSee ( $text, null $selector = null ) [!] Method is generated. Documentation taken from corresponding module.
dontSeeCheckboxIsChecked ( $checkbox ) [!] Method is generated. Documentation taken from corresponding module.
dontSeeCookie ( $name ) : mixed [!] Method is generated. Documentation taken from corresponding module.
dontSeeCurrentUrlEquals ( $uri ) [!] Method is generated. Documentation taken from corresponding module.
dontSeeCurrentUrlMatches ( $uri ) [!] Method is generated. Documentation taken from corresponding module.
dontSeeElement ( $selector, array $attributes = null ) [!] Method is generated. Documentation taken from corresponding module.
dontSeeHttpHeader ( $name, $value = null ) [!] Method is generated. Documentation taken from corresponding module.
dontSeeInCurrentUrl ( $uri ) [!] Method is generated. Documentation taken from corresponding module.
dontSeeInField ( $field, $value ) [!] Method is generated. Documentation taken from corresponding module.
dontSeeInTitle ( $title ) : mixed [!] Method is generated. Documentation taken from corresponding module.
dontSeeLink ( $text, null $url = null ) [!] Method is generated. Documentation taken from corresponding module.
dontSeeOptionIsSelected ( $select, $optionText ) : mixed [!] Method is generated. Documentation taken from corresponding module.
dontSeeResponseCodeIs ( $code ) [!] Method is generated. Documentation taken from corresponding module.
dontSeeResponseContains ( $text ) [!] Method is generated. Documentation taken from corresponding module.
dontSeeResponseContainsJson ( array $json = null ) [!] Method is generated. Documentation taken from corresponding module.
executeInGuzzle ( callable $function ) [!] Method is generated. Documentation taken from corresponding module.
fillField ( $field, $value ) [!] Method is generated. Documentation taken from corresponding module.
grabAttributeFrom ( $cssOrXpath, $attribute ) : mixed [!] Method is generated. Documentation taken from corresponding module.
grabCookie ( $name ) : mixed [!] Method is generated. Documentation taken from corresponding module.
grabDataFromJsonResponse ( string $path = null ) : string [!] Method is generated. Documentation taken from corresponding module.
grabDataFromResponseByJsonPath ( $jsonPath ) : array [!] Method is generated. Documentation taken from corresponding module.
grabFromCurrentUrl ( null $uri = null ) : mixed [!] Method is generated. Documentation taken from corresponding module.
grabHttpHeader ( $name, boolean $first = null ) : string | array [!] Method is generated. Documentation taken from corresponding module.
grabResponse ( ) : string [!] Method is generated. Documentation taken from corresponding module.
grabTextFrom ( $cssOrXPathOrRegex ) : mixed [!] Method is generated. Documentation taken from corresponding module.
grabValueFrom ( $field ) : array | mixed | null | string [!] Method is generated. Documentation taken from corresponding module.
haveHttpHeader ( $name, $value ) [!] Method is generated. Documentation taken from corresponding module.
resetCookie ( $name ) : mixed [!] Method is generated. Documentation taken from corresponding module.
see ( $text, null $selector = null ) [!] Method is generated. Documentation taken from corresponding module.
seeCheckboxIsChecked ( $checkbox ) [!] Method is generated. Documentation taken from corresponding module.
seeCookie ( $name ) : mixed [!] Method is generated. Documentation taken from corresponding module.
seeCurrentUrlEquals ( $uri ) [!] Method is generated. Documentation taken from corresponding module.
seeCurrentUrlMatches ( $uri ) [!] Method is generated. Documentation taken from corresponding module.
seeElement ( $selector, array $attributes = null ) [!] Method is generated. Documentation taken from corresponding module.
seeHttpHeader ( $name, $value = null ) [!] Method is generated. Documentation taken from corresponding module.
seeHttpHeaderOnce ( $name ) [!] Method is generated. Documentation taken from corresponding module.
seeInCurrentUrl ( $uri ) [!] Method is generated. Documentation taken from corresponding module.
seeInField ( $field, $value ) [!] Method is generated. Documentation taken from corresponding module.
seeInTitle ( $title ) : mixed [!] Method is generated. Documentation taken from corresponding module.
seeLink ( $text, null $url = null ) [!] Method is generated. Documentation taken from corresponding module.
seeNumberOfElements ( $selector, $expected ) [!] Method is generated. Documentation taken from corresponding module.
seeOptionIsSelected ( $select, $optionText ) : mixed [!] Method is generated. Documentation taken from corresponding module.
seePageNotFound ( ) [!] Method is generated. Documentation taken from corresponding module.
seeResponseCodeIs ( $code ) [!] Method is generated. Documentation taken from corresponding module.
seeResponseContains ( $text ) [!] Method is generated. Documentation taken from corresponding module.
seeResponseContainsJson ( array $json = null ) [!] Method is generated. Documentation taken from corresponding module.
seeResponseEquals ( $response ) [!] Method is generated. Documentation taken from corresponding module.
seeResponseIsJson ( ) [!] Method is generated. Documentation taken from corresponding module.
seeResponseIsXml ( ) [!] Method is generated. Documentation taken from corresponding module.
seeResponseJsonMatchesJsonPath ( $jsonPath ) [!] Method is generated. Documentation taken from corresponding module.
seeResponseJsonMatchesXpath ( $xpath ) [!] Method is generated. Documentation taken from corresponding module.
selectOption ( $select, $option ) [!] Method is generated. Documentation taken from corresponding module.
sendAjaxGetRequest ( $uri, $params = null ) [!] Method is generated. Documentation taken from corresponding module.
sendAjaxPostRequest ( $uri, $params = null ) [!] Method is generated. Documentation taken from corresponding module.
sendAjaxRequest ( $method, $uri, $params = null ) [!] Method is generated. Documentation taken from corresponding module.
sendDELETE ( $url, array $params = null, array $files = null ) [!] Method is generated. Documentation taken from corresponding module.
sendGET ( $url, array $params = null ) [!] Method is generated. Documentation taken from corresponding module.
sendHEAD ( $url, array $params = null ) [!] Method is generated. Documentation taken from corresponding module.
sendLINK ( $url, array $linkEntries ) [!] Method is generated. Documentation taken from corresponding module.
sendOPTIONS ( $url, array $params = null ) [!] Method is generated. Documentation taken from corresponding module.
sendPATCH ( $url, array $params = null, array $files = null ) [!] Method is generated. Documentation taken from corresponding module.
sendPOST ( $url, array | JsonSerializable $params = null, array $files = null ) [!] Method is generated. Documentation taken from corresponding module.
sendPUT ( $url, array $params = null, array $files = null ) [!] Method is generated. Documentation taken from corresponding module.
sendUNLINK ( $url, array $linkEntries ) [!] Method is generated. Documentation taken from corresponding module.
setCookie ( $name, $val ) : mixed [!] Method is generated. Documentation taken from corresponding module.
setHeader ( $header, $value ) [!] Method is generated. Documentation taken from corresponding module.
submitForm ( $selector, $params, $button = null ) [!] Method is generated. Documentation taken from corresponding module.
uncheckOption ( $option ) [!] Method is generated. Documentation taken from corresponding module.

Описание методов

amBearerAuthenticated() публичный Метод

Adds Bearer authentication via access token.
См. также: Codeception\Module\REST::amBearerAuthenticated()
public amBearerAuthenticated ( $accessToken )
$accessToken

amDigestAuthenticated() публичный Метод

Adds Digest authentication via username/password.
См. также: Codeception\Module\REST::amDigestAuthenticated()
public amDigestAuthenticated ( $username, $password )
$username
$password

amHttpAuthenticated() публичный Метод

Adds HTTP authentication via username/password.
См. также: Codeception\Module\REST::amHttpAuthenticated()
public amHttpAuthenticated ( $username, $password )
$username
$password

amOnPage() публичный Метод

Opens the page for the given relative URI. php amOnPage('/'); opens /register page $I->amOnPage('/register'); ?>
См. также: Codeception\Module\PhpBrowser::amOnPage()
public amOnPage ( $page )
$page

amOnSubdomain() публичный Метод

Changes the subdomain for the 'url' configuration parameter. Does not open a page; use amOnPage for that. php amOnSubdomain('user'); $I->amOnPage('/'); moves to http://user.mysite.com/ ?>
См. также: Codeception\Module\PhpBrowser::amOnSubdomain()
public amOnSubdomain ( $subdomain ) : mixed
$subdomain
Результат mixed

amOnUrl() публичный Метод

Open web page at the given absolute URL and sets its hostname as the base host. php amOnUrl('http://codeception.com'); $I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart ?>
См. также: Codeception\Module\PhpBrowser::amOnUrl()
public amOnUrl ( $url )

attachFile() публичный Метод

Attaches a file relative to the Codeception data directory to the given file upload field. php attachFile('input[@type="file"]', 'prices.xls'); ?>
См. также: Codeception\Lib\InnerBrowser::attachFile()
public attachFile ( $field, $filename )
$field
$filename

canSee() публичный Метод

Checks that the current page contains the given string. Specify a locator as the second parameter to match a specific region. php see('Logout'); // I can suppose user is logged in $I->see('Sign Up','h1'); // I can suppose it's a signup page $I->see('Sign Up','//body/h1'); // with XPath ?>
См. также: Codeception\Lib\InnerBrowser::see()
public canSee ( $text, null $selector = null )
$text
$selector null Conditional Assertion: Test won't be stopped on fail

canSeeCheckboxIsChecked() публичный Метод

Checks that the specified checkbox is checked. php 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]'); ?>
См. также: Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()
public canSeeCheckboxIsChecked ( $checkbox )
$checkbox Conditional Assertion: Test won't be stopped on fail

canSeeCookie() публичный Метод

Checks that a cookie with the given name is set. php seeCookie('PHPSESSID'); ?>
См. также: Codeception\Lib\InnerBrowser::seeCookie()
public canSeeCookie ( $name ) : mixed
Результат mixed Conditional Assertion: Test won't be stopped on fail

canSeeCurrentUrlEquals() публичный Метод

Checks that the current URL is equal to the given string. Unlike seeInCurrentUrl, this only matches the full URL. php seeCurrentUrlEquals('/'); ?>
См. также: Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()
public canSeeCurrentUrlEquals ( $uri )
$uri Conditional Assertion: Test won't be stopped on fail

canSeeCurrentUrlMatches() публичный Метод

Checks that the current URL matches the given regular expression. php seeCurrentUrlMatches('~$/users/(\d+)~'); ?>
См. также: Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()
public canSeeCurrentUrlMatches ( $uri )
$uri Conditional Assertion: Test won't be stopped on fail

canSeeElement() публичный Метод

Checks that the given element exists on the page and is visible. You can also specify expected attributes of this element. php seeElement('.error'); $I->seeElement('//form/input[1]'); $I->seeElement('input', ['name' => 'login']); $I->seeElement('input', ['value' => '123456']); strict locator in first arg, attributes in second $I->seeElement(['css' => 'form input'], ['name' => 'login']); ?>
См. также: Codeception\Lib\InnerBrowser::seeElement()
public canSeeElement ( $selector, array $attributes = null )
$selector
$attributes array

canSeeHttpHeader() публичный Метод

Checks over the given HTTP header and (optionally) its value, asserting that are there
См. также: Codeception\Module\REST::seeHttpHeader()
public canSeeHttpHeader ( $name, $value = null )
$name
$value Conditional Assertion: Test won't be stopped on fail

canSeeHttpHeaderOnce() публичный Метод

Checks that http response header is received only once. HTTP RFC2616 allows multiple response headers with the same name. You can check that you didn't accidentally sent the same header twice. php seeHttpHeaderOnce('Cache-Control'); ?>>
См. также: Codeception\Module\REST::seeHttpHeaderOnce()
public canSeeHttpHeaderOnce ( $name )
$name Conditional Assertion: Test won't be stopped on fail

canSeeInCurrentUrl() публичный Метод

Checks that current URI contains the given string. php seeInCurrentUrl('home'); to match: /users/1 $I->seeInCurrentUrl('/users/'); ?>
См. также: Codeception\Lib\InnerBrowser::seeInCurrentUrl()
public canSeeInCurrentUrl ( $uri )
$uri Conditional Assertion: Test won't be stopped on fail

canSeeInField() публичный Метод

Checks that the given input field or textarea contains the given value. For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. php seeInField('Body','Type your comment here'); $I->seeInField('form textarea[name=body]','Type your comment here'); $I->seeInField('form input[type=hidden]','hidden_value'); $I->seeInField('#searchform input','Search'); $I->seeInField('//form/*[@name=search]','Search'); $I->seeInField(['name' => 'search'], 'Search'); ?>
См. также: Codeception\Lib\InnerBrowser::seeInField()
public canSeeInField ( $field, $value )
$field
$value Conditional Assertion: Test won't be stopped on fail

canSeeInTitle() публичный Метод

Checks that the page title contains the given string. php seeInTitle('Blog - Post #1'); ?>
См. также: Codeception\Lib\InnerBrowser::seeInTitle()
public canSeeInTitle ( $title ) : mixed
$title
Результат mixed Conditional Assertion: Test won't be stopped on fail

canSeeNumberOfElements() публичный Метод

Checks that there are a certain number of elements matched by the given locator on the page. php seeNumberOfElements('tr', 10); $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements ?>
См. также: Codeception\Lib\InnerBrowser::seeNumberOfElements()
public canSeeNumberOfElements ( $selector, $expected )
$selector

canSeeOptionIsSelected() публичный Метод

Checks that the given option is selected. php seeOptionIsSelected('#form input[name=payment]', 'Visa'); ?>
См. также: Codeception\Lib\InnerBrowser::seeOptionIsSelected()
public canSeeOptionIsSelected ( $select, $optionText ) : mixed
$optionText
Результат mixed Conditional Assertion: Test won't be stopped on fail

canSeePageNotFound() публичный Метод

Asserts that current page has 404 response status code. Conditional Assertion: Test won't be stopped on fail
См. также: Codeception\Lib\InnerBrowser::seePageNotFound()
public canSeePageNotFound ( )

canSeeResponseCodeIs() публичный Метод

Checks response code equals to provided value.
См. также: Codeception\Module\REST::seeResponseCodeIs()
public canSeeResponseCodeIs ( $code )
$code Conditional Assertion: Test won't be stopped on fail

canSeeResponseContains() публичный Метод

Checks whether the last response contains text.
См. также: Codeception\Module\REST::seeResponseContains()
public canSeeResponseContains ( $text )
$text Conditional Assertion: Test won't be stopped on fail

canSeeResponseContainsJson() публичный Метод

Checks whether the last JSON response contains provided array. The response is converted to array with json_decode($response, true) Thus, JSON is represented by associative array. This method matches that response array contains provided array. Examples: php seeResponseContainsJson(array('name' => 'john')); response {user: john, profile: { email: [email protected] }} $I->seeResponseContainsJson(array('email' => '[email protected]')); ?> This method recursively checks if one array can be found inside of another.
См. также: Codeception\Module\REST::seeResponseContainsJson()
public canSeeResponseContainsJson ( array $json = null )
$json array Conditional Assertion: Test won't be stopped on fail

canSeeResponseEquals() публичный Метод

Checks if response is exactly the same as provided.
См. также: Codeception\Module\REST::seeResponseEquals()
public canSeeResponseEquals ( $response )
$response Conditional Assertion: Test won't be stopped on fail

canSeeResponseIsJson() публичный Метод

Checks whether last response was valid JSON. This is done with json_last_error function. Conditional Assertion: Test won't be stopped on fail
См. также: Codeception\Module\REST::seeResponseIsJson()

canSeeResponseIsXml() публичный Метод

Checks whether last response was valid XML. This is done with libxml_get_last_error function. Conditional Assertion: Test won't be stopped on fail
См. также: Codeception\Module\REST::seeResponseIsXml()
public canSeeResponseIsXml ( )

canSeeResponseJsonMatchesJsonPath() публичный Метод

Checks if json structure in response matches JsonPath. JsonPath is XPath equivalent for querying Json structures. Try your JsonPath expressions online. This assertion allows you to check the structure of response json. This method **require flow/jsonpath library to be installed**. json { "store": { "book": [ { "category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95 }, { "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", "price": 12.99 } ], "bicycle": { "color": "red", "price": 19.95 } } } php seeResponseJsonMatchesJsonPath('$.store.book[*].author'); first book in store has author $I->seeResponseJsonMatchesJsonPath('$.store.book[0].author'); at least one item in store has price $I->seeResponseJsonMatchesJsonPath('$.store..price'); ?>
См. также: Codeception\Module\REST::seeResponseJsonMatchesJsonPath()
public canSeeResponseJsonMatchesJsonPath ( $jsonPath )

canSeeResponseJsonMatchesXpath() публичный Метод

Checks if json structure in response matches the xpath provided. JSON is not supposed to be checked against XPath, yet it can be converted to xml and used with XPath. This assertion allows you to check the structure of response json. * json json { "store": { "book": [ { "category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95 }, { "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", "price": 12.99 } ], "bicycle": { "color": "red", "price": 19.95 } } } php seeResponseJsonMatchesXpath('//store/book/author'); first book in store has author $I->seeResponseJsonMatchesXpath('//store/book[1]/author'); at least one item in store has price $I->seeResponseJsonMatchesXpath('/store//price'); ?> ```
См. также: Codeception\Module\REST::seeResponseJsonMatchesXpath()
public canSeeResponseJsonMatchesXpath ( $xpath )

cantSee() публичный Метод

Checks that the current page doesn't contain the text specified. Give a locator as the second parameter to match a specific region. php 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 ?>
См. также: Codeception\Lib\InnerBrowser::dontSee()
public cantSee ( $text, null $selector = null )
$text
$selector null Conditional Assertion: Test won't be stopped on fail

cantSeeCheckboxIsChecked() публичный Метод

Check that the specified checkbox is unchecked. php 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. ?>
См. также: Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()
public cantSeeCheckboxIsChecked ( $checkbox )
$checkbox Conditional Assertion: Test won't be stopped on fail

cantSeeCookie() публичный Метод

Checks that there isn't a cookie with the given name.
См. также: Codeception\Lib\InnerBrowser::dontSeeCookie()
public cantSeeCookie ( $name ) : mixed
Результат mixed Conditional Assertion: Test won't be stopped on fail

cantSeeCurrentUrlEquals() публичный Метод

Checks that the current URL doesn't equal the given string. Unlike dontSeeInCurrentUrl, this only matches the full URL. php dontSeeCurrentUrlEquals('/'); ?>
См. также: Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()
public cantSeeCurrentUrlEquals ( $uri )
$uri Conditional Assertion: Test won't be stopped on fail

cantSeeCurrentUrlMatches() публичный Метод

Checks that current url doesn't match the given regular expression. php dontSeeCurrentUrlMatches('~$/users/(\d+)~'); ?>
См. также: Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()
public cantSeeCurrentUrlMatches ( $uri )
$uri Conditional Assertion: Test won't be stopped on fail

cantSeeElement() публичный Метод

Checks that the given element is invisible or not present on the page. You can also specify expected attributes of this element. php dontSeeElement('.error'); $I->dontSeeElement('//form/input[1]'); $I->dontSeeElement('input', ['name' => 'login']); $I->dontSeeElement('input', ['value' => '123456']); ?>
См. также: Codeception\Lib\InnerBrowser::dontSeeElement()
public cantSeeElement ( $selector, array $attributes = null )
$selector
$attributes array Conditional Assertion: Test won't be stopped on fail

cantSeeHttpHeader() публичный Метод

Checks over the given HTTP header and (optionally) its value, asserting that are not there
См. также: Codeception\Module\REST::dontSeeHttpHeader()
public cantSeeHttpHeader ( $name, $value = null )
$name
$value Conditional Assertion: Test won't be stopped on fail

cantSeeInCurrentUrl() публичный Метод

Checks that the current URI doesn't contain the given string. php dontSeeInCurrentUrl('/users/'); ?>
См. также: Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()
public cantSeeInCurrentUrl ( $uri )
$uri Conditional Assertion: Test won't be stopped on fail

cantSeeInField() публичный Метод

Checks that an input field or textarea doesn't contain the given value. For fuzzy locators, the field is matched by label text, CSS and XPath. php dontSeeInField('Body','Type your comment here'); $I->dontSeeInField('form textarea[name=body]','Type your comment here'); $I->dontSeeInField('form input[type=hidden]','hidden_value'); $I->dontSeeInField('#searchform input','Search'); $I->dontSeeInField('//form/*[@name=search]','Search'); $I->dontSeeInField(['name' => 'search'], 'Search'); ?>
См. также: Codeception\Lib\InnerBrowser::dontSeeInField()
public cantSeeInField ( $field, $value )
$field
$value Conditional Assertion: Test won't be stopped on fail

cantSeeInTitle() публичный Метод

Checks that the page title does not contain the given string.
См. также: Codeception\Lib\InnerBrowser::dontSeeInTitle()
public cantSeeInTitle ( $title ) : mixed
$title
Результат mixed Conditional Assertion: Test won't be stopped on fail

cantSeeOptionIsSelected() публичный Метод

Checks that the given option is not selected. php dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); ?>
См. также: Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()
public cantSeeOptionIsSelected ( $select, $optionText ) : mixed
$optionText
Результат mixed Conditional Assertion: Test won't be stopped on fail

cantSeeResponseCodeIs() публичный Метод

Checks that response code is not equal to provided value.
См. также: Codeception\Module\REST::dontSeeResponseCodeIs()
public cantSeeResponseCodeIs ( $code )
$code Conditional Assertion: Test won't be stopped on fail

cantSeeResponseContains() публичный Метод

Checks whether last response do not contain text.
См. также: Codeception\Module\REST::dontSeeResponseContains()
public cantSeeResponseContains ( $text )
$text Conditional Assertion: Test won't be stopped on fail

cantSeeResponseContainsJson() публичный Метод

Opposite to seeResponseContainsJson
См. также: Codeception\Module\REST::dontSeeResponseContainsJson()
public cantSeeResponseContainsJson ( array $json = null )
$json array Conditional Assertion: Test won't be stopped on fail

checkOption() публичный Метод

Ticks a checkbox. For radio buttons, use the selectOption method instead. php checkOption('#agree'); ?>
См. также: Codeception\Lib\InnerBrowser::checkOption()
public checkOption ( $option )
$option

click() публичный Метод

Perform a click on a link or a button, given by a locator. If a fuzzy locator is given, the page will be searched for a button, link, or image matching the locator string. For buttons, the "value" attribute, "name" attribute, and inner text are searched. For links, the link text is searched. For images, the "alt" attribute and inner text of any parent links are searched. The second parameter is a context (CSS or XPath locator) to narrow the search. Note that if the locator matches a button of type submit, the form will be submitted. php click('Logout'); button of form $I->click('Submit'); CSS button $I->click('#form input[type=submit]'); XPath $I->click('//form/*[@type=submit]'); link in context $I->click('Logout', '#nav'); using strict locator $I->click(['link' => 'Login']); ?>
См. также: Codeception\Lib\InnerBrowser::click()
public click ( $link, $context = null )
$link
$context

dontSee() публичный Метод

Checks that the current page doesn't contain the text specified. Give a locator as the second parameter to match a specific region. php 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 ?>
См. также: Codeception\Lib\InnerBrowser::dontSee()
public dontSee ( $text, null $selector = null )
$text
$selector null

dontSeeCheckboxIsChecked() публичный Метод

Check that the specified checkbox is unchecked. php 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. ?>
См. также: Codeception\Lib\InnerBrowser::dontSeeCheckboxIsChecked()
public dontSeeCheckboxIsChecked ( $checkbox )
$checkbox

dontSeeCookie() публичный Метод

Checks that there isn't a cookie with the given name.
См. также: Codeception\Lib\InnerBrowser::dontSeeCookie()
public dontSeeCookie ( $name ) : mixed
Результат mixed

dontSeeCurrentUrlEquals() публичный Метод

Checks that the current URL doesn't equal the given string. Unlike dontSeeInCurrentUrl, this only matches the full URL. php dontSeeCurrentUrlEquals('/'); ?>
См. также: Codeception\Lib\InnerBrowser::dontSeeCurrentUrlEquals()
public dontSeeCurrentUrlEquals ( $uri )
$uri

dontSeeCurrentUrlMatches() публичный Метод

Checks that current url doesn't match the given regular expression. php dontSeeCurrentUrlMatches('~$/users/(\d+)~'); ?>
См. также: Codeception\Lib\InnerBrowser::dontSeeCurrentUrlMatches()
public dontSeeCurrentUrlMatches ( $uri )
$uri

dontSeeElement() публичный Метод

Checks that the given element is invisible or not present on the page. You can also specify expected attributes of this element. php dontSeeElement('.error'); $I->dontSeeElement('//form/input[1]'); $I->dontSeeElement('input', ['name' => 'login']); $I->dontSeeElement('input', ['value' => '123456']); ?>
См. также: Codeception\Lib\InnerBrowser::dontSeeElement()
public dontSeeElement ( $selector, array $attributes = null )
$selector
$attributes array

dontSeeHttpHeader() публичный Метод

Checks over the given HTTP header and (optionally) its value, asserting that are not there
См. также: Codeception\Module\REST::dontSeeHttpHeader()
public dontSeeHttpHeader ( $name, $value = null )
$name
$value

dontSeeInCurrentUrl() публичный Метод

Checks that the current URI doesn't contain the given string. php dontSeeInCurrentUrl('/users/'); ?>
См. также: Codeception\Lib\InnerBrowser::dontSeeInCurrentUrl()
public dontSeeInCurrentUrl ( $uri )
$uri

dontSeeInField() публичный Метод

Checks that an input field or textarea doesn't contain the given value. For fuzzy locators, the field is matched by label text, CSS and XPath. php dontSeeInField('Body','Type your comment here'); $I->dontSeeInField('form textarea[name=body]','Type your comment here'); $I->dontSeeInField('form input[type=hidden]','hidden_value'); $I->dontSeeInField('#searchform input','Search'); $I->dontSeeInField('//form/*[@name=search]','Search'); $I->dontSeeInField(['name' => 'search'], 'Search'); ?>
См. также: Codeception\Lib\InnerBrowser::dontSeeInField()
public dontSeeInField ( $field, $value )
$field
$value

dontSeeInTitle() публичный Метод

Checks that the page title does not contain the given string.
См. также: Codeception\Lib\InnerBrowser::dontSeeInTitle()
public dontSeeInTitle ( $title ) : mixed
$title
Результат mixed

dontSeeOptionIsSelected() публичный Метод

Checks that the given option is not selected. php dontSeeOptionIsSelected('#form input[name=payment]', 'Visa'); ?>
См. также: Codeception\Lib\InnerBrowser::dontSeeOptionIsSelected()
public dontSeeOptionIsSelected ( $select, $optionText ) : mixed
$optionText
Результат mixed

dontSeeResponseCodeIs() публичный Метод

Checks that response code is not equal to provided value.
См. также: Codeception\Module\REST::dontSeeResponseCodeIs()
public dontSeeResponseCodeIs ( $code )
$code

dontSeeResponseContains() публичный Метод

Checks whether last response do not contain text.
См. также: Codeception\Module\REST::dontSeeResponseContains()
public dontSeeResponseContains ( $text )
$text

dontSeeResponseContainsJson() публичный Метод

Opposite to seeResponseContainsJson
См. также: Codeception\Module\REST::dontSeeResponseContainsJson()
public dontSeeResponseContainsJson ( array $json = null )
$json array

executeInGuzzle() публичный Метод

Low-level API method. If Codeception commands are not enough, use Guzzle HTTP Client methods directly Example: php executeInGuzzle(function (\GuzzleHttp\Client $client) { $client->get('/get', ['query' => ['foo' => 'bar']]); }); ?> It is not recommended to use this command on a regular basis. If Codeception lacks important Guzzle Client methods, implement them and submit patches.
См. также: Codeception\Module\PhpBrowser::executeInGuzzle()
public executeInGuzzle ( callable $function )
$function callable

fillField() публичный Метод

Fills a text field or textarea with the given string. php fillField("//input[@type='text']", "Hello World!"); $I->fillField(['name' => 'email'], '[email protected]'); ?>
См. также: Codeception\Lib\InnerBrowser::fillField()
public fillField ( $field, $value )
$field
$value

grabAttributeFrom() публичный Метод

Grabs the value of the given attribute value from the given element. Fails if element is not found. php grabAttributeFrom('#tooltip', 'title'); ?>
См. также: Codeception\Lib\InnerBrowser::grabAttributeFrom()
public grabAttributeFrom ( $cssOrXpath, $attribute ) : mixed
$cssOrXpath
$attribute
Результат mixed

grabCookie() публичный Метод

Grabs a cookie value.
См. также: Codeception\Lib\InnerBrowser::grabCookie()
public grabCookie ( $name ) : mixed
Результат mixed

grabDataFromJsonResponse() публичный Метод

Returns data from the current JSON response using specified path so that it can be used in next scenario steps. **this method is deprecated in favor of grabDataFromResponseByJsonPath** Example: php grabDataFromJsonResponse('user.user_id'); $I->sendPUT('/user', array('id' => $user_id, 'name' => 'davert')); ?>
См. также: Codeception\Module\REST::grabDataFromJsonResponse()
Устаревший: please use `grabDataFromResponseByJsonPath`
public grabDataFromJsonResponse ( string $path = null ) : string
$path string
Результат string

grabDataFromResponseByJsonPath() публичный Метод

Returns data from the current JSON response using JSONPath as selector. JsonPath is XPath equivalent for querying Json structures. Try your JsonPath expressions online. Even for a single value an array is returned. This method **require flow/jsonpath library to be installed**. Example: php user.id in json $firstUser = $I->grabDataFromJsonResponse('$..users[0].id'); $I->sendPUT('/user', array('id' => $firstUser[0], 'name' => 'davert')); ?>
См. также: Codeception\Module\REST::grabDataFromResponseByJsonPath()
public grabDataFromResponseByJsonPath ( $jsonPath ) : array
$jsonPath
Результат array

grabFromCurrentUrl() публичный Метод

Executes the given regular expression against the current URI and returns the first match. If no parameters are provided, the full URI is returned. php grabFromCurrentUrl('~$/user/(\d+)/~'); $uri = $I->grabFromCurrentUrl(); ?>
См. также: Codeception\Lib\InnerBrowser::grabFromCurrentUrl()
public grabFromCurrentUrl ( null $uri = null ) : mixed
$uri null
Результат mixed

grabHttpHeader() публичный Метод

Returns the value of the specified header name
См. также: Codeception\Module\REST::grabHttpHeader()
public grabHttpHeader ( $name, boolean $first = null ) : string | array
$name
$first boolean Whether to return the first value or all header values
Результат string | array The first header value if $first is true, an array of values otherwise

grabResponse() публичный Метод

Returns current response so that it can be used in next scenario steps. Example: php grabResponse(); $I->sendPUT('/user', array('id' => $user_id, 'name' => 'davert')); ?>
См. также: Codeception\Module\REST::grabResponse()
public grabResponse ( ) : string
Результат string

grabTextFrom() публичный Метод

Finds and returns the text contents of the given element. If a fuzzy locator is used, the element is found using CSS, XPath, and by matching the full page source by regular expression. php grabTextFrom('h1'); $heading = $I->grabTextFrom('descendant-or-self::h1'); $value = $I->grabTextFrom('~
См. также: Codeception\Lib\InnerBrowser::grabTextFrom()
public grabTextFrom ( $cssOrXPathOrRegex ) : mixed
$cssOrXPathOrRegex
Результат mixed

grabValueFrom() публичный Метод

[!] Method is generated. Documentation taken from corresponding module.
См. также: Codeception\Lib\InnerBrowser::grabValueFrom()
public grabValueFrom ( $field ) : array | mixed | null | string
$field
Результат array | mixed | null | string

haveHttpHeader() публичный Метод

Sets HTTP header
См. также: Codeception\Module\REST::haveHttpHeader()
public haveHttpHeader ( $name, $value )
$name
$value

resetCookie() публичный Метод

Unsets cookie with the given name.
См. также: Codeception\Lib\InnerBrowser::resetCookie()
public resetCookie ( $name ) : mixed
Результат mixed

see() публичный Метод

Checks that the current page contains the given string. Specify a locator as the second parameter to match a specific region. php see('Logout'); // I can suppose user is logged in $I->see('Sign Up','h1'); // I can suppose it's a signup page $I->see('Sign Up','//body/h1'); // with XPath ?>
См. также: Codeception\Lib\InnerBrowser::see()
public see ( $text, null $selector = null )
$text
$selector null

seeCheckboxIsChecked() публичный Метод

Checks that the specified checkbox is checked. php 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]'); ?>
См. также: Codeception\Lib\InnerBrowser::seeCheckboxIsChecked()
public seeCheckboxIsChecked ( $checkbox )
$checkbox

seeCookie() публичный Метод

Checks that a cookie with the given name is set. php seeCookie('PHPSESSID'); ?>
См. также: Codeception\Lib\InnerBrowser::seeCookie()
public seeCookie ( $name ) : mixed
Результат mixed

seeCurrentUrlEquals() публичный Метод

Checks that the current URL is equal to the given string. Unlike seeInCurrentUrl, this only matches the full URL. php seeCurrentUrlEquals('/'); ?>
См. также: Codeception\Lib\InnerBrowser::seeCurrentUrlEquals()
public seeCurrentUrlEquals ( $uri )
$uri

seeCurrentUrlMatches() публичный Метод

Checks that the current URL matches the given regular expression. php seeCurrentUrlMatches('~$/users/(\d+)~'); ?>
См. также: Codeception\Lib\InnerBrowser::seeCurrentUrlMatches()
public seeCurrentUrlMatches ( $uri )
$uri

seeElement() публичный Метод

Checks that the given element exists on the page and is visible. You can also specify expected attributes of this element. php seeElement('.error'); $I->seeElement('//form/input[1]'); $I->seeElement('input', ['name' => 'login']); $I->seeElement('input', ['value' => '123456']); strict locator in first arg, attributes in second $I->seeElement(['css' => 'form input'], ['name' => 'login']); ?>
См. также: Codeception\Lib\InnerBrowser::seeElement()
public seeElement ( $selector, array $attributes = null )
$selector
$attributes array

seeHttpHeader() публичный Метод

Checks over the given HTTP header and (optionally) its value, asserting that are there
См. также: Codeception\Module\REST::seeHttpHeader()
public seeHttpHeader ( $name, $value = null )
$name
$value

seeHttpHeaderOnce() публичный Метод

Checks that http response header is received only once. HTTP RFC2616 allows multiple response headers with the same name. You can check that you didn't accidentally sent the same header twice. php seeHttpHeaderOnce('Cache-Control'); ?>>
См. также: Codeception\Module\REST::seeHttpHeaderOnce()
public seeHttpHeaderOnce ( $name )
$name

seeInCurrentUrl() публичный Метод

Checks that current URI contains the given string. php seeInCurrentUrl('home'); to match: /users/1 $I->seeInCurrentUrl('/users/'); ?>
См. также: Codeception\Lib\InnerBrowser::seeInCurrentUrl()
public seeInCurrentUrl ( $uri )
$uri

seeInField() публичный Метод

Checks that the given input field or textarea contains the given value. For fuzzy locators, fields are matched by label text, the "name" attribute, CSS, and XPath. php seeInField('Body','Type your comment here'); $I->seeInField('form textarea[name=body]','Type your comment here'); $I->seeInField('form input[type=hidden]','hidden_value'); $I->seeInField('#searchform input','Search'); $I->seeInField('//form/*[@name=search]','Search'); $I->seeInField(['name' => 'search'], 'Search'); ?>
См. также: Codeception\Lib\InnerBrowser::seeInField()
public seeInField ( $field, $value )
$field
$value

seeInTitle() публичный Метод

Checks that the page title contains the given string. php seeInTitle('Blog - Post #1'); ?>
См. также: Codeception\Lib\InnerBrowser::seeInTitle()
public seeInTitle ( $title ) : mixed
$title
Результат mixed

seeNumberOfElements() публичный Метод

Checks that there are a certain number of elements matched by the given locator on the page. php seeNumberOfElements('tr', 10); $I->seeNumberOfElements('tr', [0,10]); //between 0 and 10 elements ?>
См. также: Codeception\Lib\InnerBrowser::seeNumberOfElements()
public seeNumberOfElements ( $selector, $expected )
$selector

seeOptionIsSelected() публичный Метод

Checks that the given option is selected. php seeOptionIsSelected('#form input[name=payment]', 'Visa'); ?>
См. также: Codeception\Lib\InnerBrowser::seeOptionIsSelected()
public seeOptionIsSelected ( $select, $optionText ) : mixed
$optionText
Результат mixed

seePageNotFound() публичный Метод

Asserts that current page has 404 response status code.
См. также: Codeception\Lib\InnerBrowser::seePageNotFound()
public seePageNotFound ( )

seeResponseCodeIs() публичный Метод

Checks response code equals to provided value.
См. также: Codeception\Module\REST::seeResponseCodeIs()
public seeResponseCodeIs ( $code )
$code

seeResponseContains() публичный Метод

Checks whether the last response contains text.
См. также: Codeception\Module\REST::seeResponseContains()
public seeResponseContains ( $text )
$text

seeResponseContainsJson() публичный Метод

Checks whether the last JSON response contains provided array. The response is converted to array with json_decode($response, true) Thus, JSON is represented by associative array. This method matches that response array contains provided array. Examples: php seeResponseContainsJson(array('name' => 'john')); response {user: john, profile: { email: [email protected] }} $I->seeResponseContainsJson(array('email' => '[email protected]')); ?> This method recursively checks if one array can be found inside of another.
См. также: Codeception\Module\REST::seeResponseContainsJson()
public seeResponseContainsJson ( array $json = null )
$json array

seeResponseEquals() публичный Метод

Checks if response is exactly the same as provided.
См. также: Codeception\Module\REST::seeResponseEquals()
public seeResponseEquals ( $response )
$response

seeResponseIsJson() публичный Метод

Checks whether last response was valid JSON. This is done with json_last_error function.
См. также: Codeception\Module\REST::seeResponseIsJson()
public seeResponseIsJson ( )

seeResponseIsXml() публичный Метод

Checks whether last response was valid XML. This is done with libxml_get_last_error function.
См. также: Codeception\Module\REST::seeResponseIsXml()
public seeResponseIsXml ( )

seeResponseJsonMatchesJsonPath() публичный Метод

Checks if json structure in response matches JsonPath. JsonPath is XPath equivalent for querying Json structures. Try your JsonPath expressions online. This assertion allows you to check the structure of response json. This method **require flow/jsonpath library to be installed**. json { "store": { "book": [ { "category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95 }, { "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", "price": 12.99 } ], "bicycle": { "color": "red", "price": 19.95 } } } php seeResponseJsonMatchesJsonPath('$.store.book[*].author'); first book in store has author $I->seeResponseJsonMatchesJsonPath('$.store.book[0].author'); at least one item in store has price $I->seeResponseJsonMatchesJsonPath('$.store..price'); ?>
См. также: Codeception\Module\REST::seeResponseJsonMatchesJsonPath()
public seeResponseJsonMatchesJsonPath ( $jsonPath )

seeResponseJsonMatchesXpath() публичный Метод

Checks if json structure in response matches the xpath provided. JSON is not supposed to be checked against XPath, yet it can be converted to xml and used with XPath. This assertion allows you to check the structure of response json. * json json { "store": { "book": [ { "category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95 }, { "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", "price": 12.99 } ], "bicycle": { "color": "red", "price": 19.95 } } } php seeResponseJsonMatchesXpath('//store/book/author'); first book in store has author $I->seeResponseJsonMatchesXpath('//store/book[1]/author'); at least one item in store has price $I->seeResponseJsonMatchesXpath('/store//price'); ?> ```
См. также: Codeception\Module\REST::seeResponseJsonMatchesXpath()
public seeResponseJsonMatchesXpath ( $xpath )

selectOption() публичный Метод

Selects an option in a select tag or in radio button group. php selectOption('form select[name=account]', 'Premium'); $I->selectOption('form input[name=payment]', 'Monthly'); $I->selectOption('//form/select[@name=account]', 'Monthly'); ?> Provide an array for the second argument to select multiple options: php selectOption('Which OS do you use?', array('Windows','Linux')); ?>
См. также: Codeception\Lib\InnerBrowser::selectOption()
public selectOption ( $select, $option )
$select
$option

sendAjaxGetRequest() публичный Метод

If your page triggers an ajax request, you can perform it manually. This action sends a GET ajax request with specified params. See ->sendAjaxPostRequest for examples.
См. также: Codeception\Lib\InnerBrowser::sendAjaxGetRequest()
public sendAjaxGetRequest ( $uri, $params = null )
$uri
$params

sendAjaxPostRequest() публичный Метод

If your page triggers an ajax request, you can perform it manually. This action sends a POST ajax request with specified params. Additional params can be passed as array. Example: Imagine that by clicking checkbox you trigger ajax request which updates user settings. We emulate that click by running this ajax request manually. php sendAjaxPostRequest('/updateSettings', array('notifications' => true)); // POST $I->sendAjaxGetRequest('/updateSettings', array('notifications' => true)); // GET
См. также: Codeception\Lib\InnerBrowser::sendAjaxPostRequest()
public sendAjaxPostRequest ( $uri, $params = null )
$uri
$params

sendAjaxRequest() публичный Метод

If your page triggers an ajax request, you can perform it manually. This action sends an ajax request with specified method and params. Example: You need to perform an ajax request specifying the HTTP method. php sendAjaxRequest('PUT', '/posts/7', array('title' => 'new title'));
См. также: Codeception\Lib\InnerBrowser::sendAjaxRequest()
public sendAjaxRequest ( $method, $uri, $params = null )
$method
$uri
$params

sendDELETE() публичный Метод

Sends DELETE request to given uri.
См. также: Codeception\Module\REST::sendDELETE()
public sendDELETE ( $url, array $params = null, array $files = null )
$url
$params array
$files array

sendGET() публичный Метод

Sends a GET request to given uri.
См. также: Codeception\Module\REST::sendGET()
public sendGET ( $url, array $params = null )
$url
$params array

sendHEAD() публичный Метод

Sends a HEAD request to given uri.
См. также: Codeception\Module\REST::sendHEAD()
public sendHEAD ( $url, array $params = null )
$url
$params array

sendOPTIONS() публичный Метод

Sends an OPTIONS request to given uri.
См. также: Codeception\Module\REST::sendOPTIONS()
public sendOPTIONS ( $url, array $params = null )
$url
$params array

sendPATCH() публичный Метод

Sends PATCH request to given uri.
См. также: Codeception\Module\REST::sendPATCH()
public sendPATCH ( $url, array $params = null, array $files = null )
$url
$params array
$files array

sendPOST() публичный Метод

Sends a POST request to given uri. Parameters and files (as array of filenames) can be provided.
См. также: Codeception\Module\REST::sendPOST()
public sendPOST ( $url, array | JsonSerializable $params = null, array $files = null )
$url
$params array | JsonSerializable
$files array

sendPUT() публичный Метод

Sends PUT request to given uri.
См. также: Codeception\Module\REST::sendPUT()
public sendPUT ( $url, array $params = null, array $files = null )
$url
$params array
$files array

setCookie() публичный Метод

Sets a cookie with the given name and value. php setCookie('PHPSESSID', 'el4ukv0kqbvoirg7nkp4dncpk3'); ?>
См. также: Codeception\Lib\InnerBrowser::setCookie()
public setCookie ( $name, $val ) : mixed
Результат mixed

setHeader() публичный Метод

[!] Method is generated. Documentation taken from corresponding module.
См. также: Codeception\Module\PhpBrowser::setHeader()
public setHeader ( $header, $value )

submitForm() публичный Метод

Submits the given form on the page, optionally with the given form values. Give the form fields values as an array. Skipped fields will be filled by their values from the page. You don't need to click the 'Submit' button afterwards. This command itself triggers the request to form's action. You can optionally specify what button's value to include in the request with the last parameter as an alternative to explicitly setting its value in the second parameter, as button values are not otherwise included in the request. Examples: php submitForm('#login', array('login' => 'davert', 'password' => '123456')); or $I->submitForm('#login', array('login' => 'davert', 'password' => '123456'), 'submitButtonName'); For example, given this sample "Sign Up" form: html
Login:
Password:
Do you agree to out terms?
Select pricing plan
You could write the following to submit it: php submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true)), 'submitButton'); Note that "2" will be the submitted value for the "plan" field, as it is the selected option. You can also emulate a JavaScript submission by not specifying any buttons in the third parameter to submitForm. php submitForm('#userForm', array('user' => array('login' => 'Davert', 'password' => '123456', 'agree' => true)));
См. также: Codeception\Lib\InnerBrowser::submitForm()
public submitForm ( $selector, $params, $button = null )
$selector
$params
$button

uncheckOption() публичный Метод

Unticks a checkbox. php uncheckOption('#notify'); ?>
См. также: Codeception\Lib\InnerBrowser::uncheckOption()
public uncheckOption ( $option )
$option