本文整理汇总了PHP中FunctionalTester::seeInCurrentUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionalTester::seeInCurrentUrl方法的具体用法?PHP FunctionalTester::seeInCurrentUrl怎么用?PHP FunctionalTester::seeInCurrentUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FunctionalTester
的用法示例。
在下文中一共展示了FunctionalTester::seeInCurrentUrl方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->am('a Larabook member');
$I->wantTo('Login to my Larabook account');
$I->signIn();
$I->seeInCurrentUrl('/statuses');
$I->see('Welcome back!');
$I->assertTrue(Auth::check());
示例2: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->am('a Larabook member');
$I->wantTo('I want to view my profile');
$I->signIn();
$I->postAStatus('My new status.');
$I->click('Your profile');
$I->seeInCurrentUrl('/@Foobar');
$I->see('My new status.');
示例3: FunctionalTester
<?php
/**
* @var \Codeception\Scenario $scenario
*/
$I = new FunctionalTester($scenario);
$I->wantTo('login as regular user');
$I->amOnPage('/');
$I->click('Log In/Sign Up');
$I->seeInCurrentUrl('/session/index');
$I->see('Log In', "//*[@id='login-header']");
$I->see("Don't have an account yet?", "//*[@id='signup-header']");
$I->fillField('email', 'demo@phalconphp.com');
$I->fillField('password', 'phalcon');
$I->click('Login');
$I->seeInCurrentUrl('/session/start');
$I->see('Welcome Phalcon Demo');
$I->seeLink('Log Out');
示例4: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->expectTo('have a usere in the database');
$I->haveRecord('users', ['username' => 'verem', 'password' => 'danverem', 'email' => 'danverem@gmail.com', 'profile_state' => 0]);
$I->expectTo('have a logged in user');
$user = $I->grabRecord('users', ['username' => 'verem']);
$I->amLoggedAs(['username' => $user->username, 'id' => $user->id, 'password' => $user->password]);
$I->wantTo('test if chops is posting to database');
$I->amOnAction('ChopsController@create');
$I->seeInCurrentUrl('/create');
$I->see('What\'s that special meal you just ate today');
$I->fillField('name', 'edikaikong');
$I->attachFile('image', 'julia.jpeg');
$I->fillField('about', 'This food is the best dish in the country');
$I->click('submitButton');
$I->seeInCurrentUrl('/chops');
示例5: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->wantTo('test if chops can be displayed on the home page after posting');
$I->expectTo('have a registered user in the database');
$user_id = $I->haveRecord('users', ['username' => 'John Doe', 'password' => 'johndope', 'email' => 'john@doe.com', 'profile_state' => 0]);
$I->expectTo('have a chops record in the database');
$I->haveRecord('chops', ['chops_name' => 'A new name', 'about' => 'About this chops', 'user_id' => $user_id, 'likes' => 0]);
$I->expectTo('have the action take place in the controller');
$I->amOnAction('ChopsController@index');
$I->seeInCurrentUrl('/chops');
$I->see('About this chops');
$I->see('A new name');
示例6: FunctionalTester
<?php
/**
* @var \Codeception\Scenario $scenario
*/
$I = new FunctionalTester($scenario);
$I->wantTo('logout from site');
$I->haveInSession('auth', ['id' => 1, 'name' => 'Phalcon Demo']);
$I->amOnPage('/');
$I->click('Log Out');
$I->see('Goodbye Phalcon Demo!');
$I->seeInCurrentUrl('/session/end');
示例7: FunctionalTester
<?php
/**
* @var \Codeception\Scenario $scenario
*/
$I = new FunctionalTester($scenario);
$I->wantTo('open invoices page and see invoices there');
$I->haveInSession('auth', ['id' => 1, 'name' => 'Phalcon Demo']);
$I->amOnPage('/');
$I->click('Invoices');
$I->seeInCurrentUrl('/invoices/index');
$I->see('Your Invoices');
示例8: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->wantTo('login as a user from index page with invalid details');
$I->expectTo('fail to login');
$I->amOnPage('/');
$I->submitForm('form#login', ['email' => 'andelabendo', 'password' => 'password']);
$I->seeInCurrentUrl('/login');
$I->dontSeeAuthentication();
$I->seeFormHasErrors();
$I->see('These credentials do not match our records.');
$I->wantTo('login as a user from index page with correct details');
$I->expectTo('have a users in the database');
$I->amOnPage('/');
$I->haveRecord('users', ['email' => 'andela@andela.com', 'username' => 'andelabendozy', 'password' => bcrypt('password'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'status' => TRUE, 'profile_state' => FALSE]);
$I->submitForm('form#login', ['email' => 'andelabendozy', 'password' => 'password']);
$I->seeCurrentUrlEquals('');
$I->amOnPage('/');
$I->seeAuthentication();
$I->wantTo('logout');
$I->logout();
$I->dontSeeAuthentication();
示例9: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->am('a BCD Online Forms website member');
$I->wantTo('login to BCD Online Forms account');
$I->signIn();
$I->seeInCurrentUrl('/dashboard');
$I->see('Dashboard');