当前位置: 首页>>代码示例>>PHP>>正文


PHP FunctionalTester::seeInCurrentUrl方法代码示例

本文整理汇总了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());
开发者ID:billwaddyjr,项目名称:laracasts,代码行数:9,代码来源:SignInCept.php

示例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.');
开发者ID:billwaddyjr,项目名称:laracasts,代码行数:10,代码来源:ProfileCept.php

示例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');
开发者ID:codeception,项目名称:phalcon-demo,代码行数:18,代码来源:LoginCept.php

示例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');
开发者ID:andela,项目名称:chopbox,代码行数:17,代码来源:CreateChopsCept.php

示例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');
开发者ID:andela,项目名称:chopbox,代码行数:13,代码来源:ViewChopsCept.php

示例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');
开发者ID:codeception,项目名称:phalcon-demo,代码行数:12,代码来源:LogOutCept.php

示例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');
开发者ID:codeception,项目名称:phalcon-demo,代码行数:12,代码来源:InvoicesCept.php

示例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();
开发者ID:andela,项目名称:chopbox,代码行数:22,代码来源:LoginFromIndexCept.php

示例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');
开发者ID:cmd0315,项目名称:online-forms,代码行数:8,代码来源:SignInCept.php


注:本文中的FunctionalTester::seeInCurrentUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。