seeInCurrentUrl() public method

Checks that current URI contains the given string. php seeInCurrentUrl('home'); to match: /users/1 $I->seeInCurrentUrl('/users/'); ?>
See also: Codeception\Lib\InnerBrowser::seeInCurrentUrl()
public seeInCurrentUrl ( $uri )
$uri
コード例 #1
0
ファイル: FriendsCept.php プロジェクト: hitechdk/Codeception
<?php

$I = new WebGuy($scenario);
$I->wantTo('call friends to try multi session');
$I->amOnPage('/info');
$jon = $I->haveFriend('jon');
$jon->does(function (WebGuy $I) {
    $I->amOnPage('/');
    $I->seeInCurrentUrl('/');
});
$I->seeInCurrentUrl('/info');
コード例 #2
0
$I->fillField('input#name', 'Some User');
$I->fillField('input#website', 'http://google.com');
$I->fillField('input#work_phone', '+308123456789');
$I->fillField('input#address1', 'Test Address 1');
$I->fillField('input#address2', 'Test Address 2 APPTMT SUITE');
$I->fillField('input#city', 'Zaporozhe');
$I->fillField('input#state', 'Test Province');
$I->fillField('input#postal_code', 'postcode 123455677');
$option = 'Net 7';
$I->selectOption("#payment_terms", $option);
$option = 'Euro';
$I->selectOption("#currency_id", $option);
$option = '500+';
$I->selectOption("#size_id", $option);
$option = 'Aerospace';
$I->selectOption("#industry_id", $option);
//----private notes
$I->fillField('#private_notes', 'Test Note Note Notes');
//-----------------------Form is Finished--
$I->click('Save');
$I->seeInCurrentUrl('/clients/');
$I->dontSeeInCurrentUrl('/users/');
$I->dontSeeInCurrentUrl('/user/');
$I->see('Details');
$I->see('Contacts');
$I->see('*****@*****.**');
$I->seeInDatabase('contacts', ['email' => '*****@*****.**']);
$I->seeInDatabase('contacts', ['email' => '*****@*****.**']);
$I->seeInDatabase('contacts', ['email' => '*****@*****.**']);
$I->seeInDatabase('clients', array('currency_id' => 3, 'name' => 'Some User', 'address1' => 'Test Address 1', 'address2' => 'Test Address 2 APPTMT SUITE', 'city' => 'Zaporozhe', 'state' => 'Test Province', 'postal_code' => 'postcode 123455677', 'work_phone' => '+308123456789', 'private_notes' => 'Test Note Note Notes', 'payment_terms' => 7, 'industry_id' => 3, 'size_id' => 6));
//$I->seeInDatabase('clients', ['email' => '*****@*****.**']);