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


PHP AcceptanceTester::seeCurrentUrlEquals方法代码示例

本文整理汇总了PHP中AcceptanceTester::seeCurrentUrlEquals方法的典型用法代码示例。如果您正苦于以下问题:PHP AcceptanceTester::seeCurrentUrlEquals方法的具体用法?PHP AcceptanceTester::seeCurrentUrlEquals怎么用?PHP AcceptanceTester::seeCurrentUrlEquals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AcceptanceTester的用法示例。


在下文中一共展示了AcceptanceTester::seeCurrentUrlEquals方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: loginWithInvalidCredentials

 public function loginWithInvalidCredentials(AcceptanceTester $I)
 {
     $I->amOnPage('/login');
     $I->click('Login');
     $I->seeCurrentUrlEquals('/login');
     $I->see('Invalid Credentials', '.flash');
 }
开发者ID:joyhuang-note,项目名称:laravel-testing-decoded,代码行数:7,代码来源:LoginCest.php

示例2: editTask

 public function editTask(AcceptanceTester $I)
 {
     $description = $this->faker->text(100);
     $I->wantTo('edit a task');
     $I->amOnPage('/tasks/1/edit');
     $I->seeCurrentUrlEquals('/tasks/1/edit');
     $I->fillField('#description', $description);
     $I->click('Save');
     $I->seeInDatabase('tasks', ['description' => $description]);
 }
开发者ID:hannenijhuis,项目名称:invoiceninja,代码行数:10,代码来源:TaskCest.php

示例3: editClient

 public function editClient(AcceptanceTester $I)
 {
     $I->wantTo('Edit a client');
     //$id = Helper::getRandom('Client', 'public_id');
     //$url = sprintf('/clients/%d/edit', $id);
     $url = '/clients/1/edit';
     $I->amOnPage($url);
     $I->seeCurrentUrlEquals($url);
     //update fields
     $name = $this->faker->firstName;
     $I->fillField(['name' => 'name'], $name);
     $I->click('Save');
     $I->see($name);
 }
开发者ID:hannenijhuis,项目名称:invoiceninja,代码行数:14,代码来源:ClientCest.php

示例4: testAddProductToCart

 /**
  * Tests add product to cart
  *
  * @group checkout
  *
  * @param $I \AcceptanceTester
  *
  */
 public function testAddProductToCart(AT $I)
 {
     $I->am('Visitor');
     $I->wantTo('Add product to cart');
     $I->amGoingTo('open category page');
     $I->amOnPage(Page\Catalog::$CATEGORY_URL);
     $I->expectTo('see category page');
     $I->amGoingTo('open product page');
     $I->click(Page\Catalog::$categoryFirstProduct);
     $I->expectTo('see product page');
     $I->seeElement(Page\Catalog::$productBody);
     $I->amGoingTo('submit the form');
     $I->submitForm(Page\Catalog::$addToCartForm, array());
     $I->expectTo('see the cart page');
     $I->seeCurrentUrlEquals(Page\Checkout::$CART_URL);
     $I->expectTo('see a success message');
     $I->seeElement(Page\Catalog::$successMessage);
 }
开发者ID:rogyar,项目名称:Magento-Codeception,代码行数:26,代码来源:CheckoutCest.php

示例5: AcceptanceTester

<?php

$I = new AcceptanceTester($scenario);
$I->am('Site Administrator');
$I->wantTo('Add a new Product');
$I->amLoggedAs($I->aSiteAdministrator());
$I->amOnPage('/admin/products');
$I->click('Add Product');
$I->seeCurrentUrlEquals('/admin/products/create');
$category = \App\Repositories\Category::get()->toArray();
$I->selectOption('category', $category[0]['id']);
$I->fillField('name', 'Malt Liquor');
$I->fillField('description', 'Malt Liquor for you to describe');
$I->fillField('price', '34.00');
$I->fillField('quantity', '150');
$I->selectOption('status', '1');
$I->attachFile('image', 'roundrect8537796.gif');
$I->click('Create Product');
$I->seeCurrentUrlEquals('/admin/products');
$I->see('New Product: Malt Liquor Created');
开发者ID:jbmadking,项目名称:bottlestore,代码行数:20,代码来源:AddNewProductCept.php

示例6: AcceptanceTester

<?php

/**
 * @link http://www.diemeisterei.de/
 * @copyright Copyright (c) 2015 diemeisterei GmbH, Stuttgart
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
$I = new AcceptanceTester($scenario);
$I->wantTo('ensure that language urls and redirects work');
$I->amOnPage('/');
$I->seeCurrentUrlEquals('/en/user/login');
$I->amOnPage('/de');
$I->seeCurrentUrlEquals('/de/user/login');
$I->see('Anmelden');
$I->makeScreenshot('language-de');
$I->amOnPage('/en-us');
$I->see('Not Found');
开发者ID:philippfrenzel,项目名称:wortundtat,代码行数:19,代码来源:LanguagesCept.php

示例7: AcceptanceTester

<?php

$I = new AcceptanceTester($scenario);
$I->wantTo('Validate the login function with zhaobing\' email and password! ');
$I->amOnPage('/');
$I->see('赵兵的电影');
$I->canSeeInCurrentUrl('/auth/login');
$I->fillField('email', 'zhaobing024@gmail.com');
$I->fillField('password', '123456');
$I->click('Login');
$I->seeCurrentUrlEquals('/movies');
$I->see('欢迎赵兵登录');
开发者ID:huoybb,项目名称:movie,代码行数:12,代码来源:HomePageCept.php

示例8: AcceptanceTester

<?php

$I = new AcceptanceTester($scenario);
$I->am('Site Administrator');
$I->wantTo('View all products');
$I->amLoggedAs($I->aSiteAdministrator());
$I->amOnPage('/admin/dashboard');
$I->click('Products');
$I->seeCurrentUrlEquals('/admin/products');
$I->see('Products Administration');
开发者ID:jbmadking,项目名称:bottlestore,代码行数:10,代码来源:ViewProductsAdminPageCept.php

示例9: AcceptanceTester

<?php

$I = new AcceptanceTester($scenario);
$I->am('Site User');
$I->wantTo('Be restricted from the Administrator\'s section');
$I->amLoggedAs($I->siteUser());
$I->amOnPage('/admin/dashboard');
$I->seeCurrentUrlEquals('/user/dashboard');
$I->see('Restricted Access!!!');
$I->amOnPage('/admin/categories');
$I->seeCurrentUrlEquals('/user/dashboard');
$I->see('Restricted Access!!!');
$I->amOnPage('/admin/products');
$I->seeCurrentUrlEquals('/user/dashboard');
$I->see('Restricted Access!!!');
$I->amOnPage('/admin/administrators');
$I->seeCurrentUrlEquals('/user/dashboard');
$I->see('Restricted Access!!!');
$I->amOnPage('/admin/clients');
$I->seeCurrentUrlEquals('/user/dashboard');
$I->see('Restricted Access!!!');
开发者ID:jbmadking,项目名称:bottlestore,代码行数:21,代码来源:RestrictAdminSectionCept.php

示例10: AcceptanceTester

<?php

$I = new AcceptanceTester($scenario);
$I->wantTo('see the Home page');
$I->amOnPage('/');
$I->see('My albums');
$I->seeInDatabase('album', array('artist' => 'Adele', 'title' => '21'));
$I->seeLink('Add new album');
$I->click('Add new album');
$I->see('Title');
$I->see('Artist');
$I->seeCurrentUrlEquals('/album/add');
$I->fillField('title', 'foo');
$I->fillField('artist', 'bar');
// enable repopulate and cleanup in codeception.yml to reset the db before each test
// enabld module Db in acceptance.suite.yml to use this feature
// click submit to add the new album
//$I->dontSee('foo');
//$I->click('submit');
//$I->see('foo');
开发者ID:stuheiss,项目名称:zf2-tutorial,代码行数:20,代码来源:HomeCept.php

示例11: AcceptanceTester

<?php

$I = new AcceptanceTester($scenario);
$I->wantTo('test everything under the sun... one moment...');
$I->wantTo('sign up for a new account');
$I->amOnPage('/register');
$I->fillField('Name', 'Test User');
$I->fillField('Email Address', 'test.user@gmail.com');
$I->fillField('Password', 'batman');
$I->fillField('Confirm Password', 'batman');
$I->click('Sign Up');
$I->seeCurrentUrlEquals('/home');
$I->wantTo('sign out and check I can log back in successfully');
$I->see('Sign Out');
$I->click('Sign Out');
$I->seeCurrentURlEquals('/');
$I->amOnPage('/login');
$I->fillField('Email Address', 'test.user@gmail.com');
$I->fillField('Password', 'batman');
$I->click('Log In');
$I->seeCurrentUrlEquals('/home');
$I->wantTo('add a category and get started');
$I->amOnPage('/home');
$I->see('Add a Category Below');
$I->fillField('Category Name', 'Test Category');
$I->click('Add Category');
$I->seeCurrentUrlEquals('/home');
$I->see('Test Category');
$I->wantTo('add another category');
$I->fillField('Category Name', 'My Next Category');
$I->fillField('Category Description', 'I can put whatever I want here???');
开发者ID:TwoBitAlchemist,项目名称:kbay-bsm-laravel-hw,代码行数:31,代码来源:UserNovelCept.php

示例12: AcceptanceTester

<?php

$I = new AcceptanceTester($scenario);
$I->am('Site User');
$I->wantTo('Log in as a Site User');
$I->amOnPage('/');
$I->click('Login');
$I->seeCurrentUrlEquals('/auth/login');
$I->fillField('email', 'jbmatikinye@gmail.com');
$I->fillField('password', 'joshua');
$I->click('login_user');
$I->seeCurrentUrlEquals('/user/dashboard');
$I->see('User Dashboard');
开发者ID:jbmadking,项目名称:bottlestore,代码行数:13,代码来源:LoginSiteUserCept.php

示例13: AcceptanceTester

<?php

/**
 * ownCloud - galleryplus
 *
 * This file is licensed under the Affero General Public License version 3 or
 * later. See the COPYING file.
 *
 * @author Olivier Paroz <owncloud@interfasys.ch>
 *
 * @copyright Olivier Paroz 2015
 */
use Page\Acceptance\Login;
use Page\Gallery as GalleryPage;
$I = new AcceptanceTester($scenario);
$I->am('a standard user');
$I->wantTo('load the Gallery+ app');
$I->lookForwardTo('seeing my holiday pictures');
$loginPage = new Login($I);
$loginPage->login('admin', 'admin');
$loginPage->confirmLogin();
$I->click('.menutoggle');
$I->click('Gallery+', '#navigation');
$I->seeCurrentUrlEquals(GalleryPage::$URL);
$I->seeElement(GalleryPage::$contentDiv);
开发者ID:patman15,项目名称:galleryplus,代码行数:25,代码来源:SignInAsUserCept.php

示例14: AcceptanceTester

<?php

$I = new AcceptanceTester($scenario);
$I->am('a guest');
$I->wantTo('clean slug and redirect');
$I->amOnPage('test@');
$I->seeCurrentUrlEquals('/testat');
$I->amOnPage(' this will have dash between');
$I->seeCurrentUrlEquals('/this-will-have-dash-between');
$I->amOnPage('password@/login');
$I->seeCurrentUrlEquals('/passwordat');
开发者ID:kocoten1992,项目名称:manhgiay.co,代码行数:11,代码来源:AutoCleanAndRedirectSlugCept.php

示例15: AcceptanceTester

<?php

$I = new AcceptanceTester($scenario);
$I->am('a guest');
$I->wantTo('have password prompt if page is protected');
$I->amOnPage('password');
$I->seeCurrentUrlEquals('/password/login');
开发者ID:kocoten1992,项目名称:manhgiay.co,代码行数:7,代码来源:CannotAccessIfPasswordExistedCept.php


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