本文整理汇总了PHP中FunctionalTester::seeCurrentUrlMatches方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionalTester::seeCurrentUrlMatches方法的具体用法?PHP FunctionalTester::seeCurrentUrlMatches怎么用?PHP FunctionalTester::seeCurrentUrlMatches使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FunctionalTester
的用法示例。
在下文中一共展示了FunctionalTester::seeCurrentUrlMatches方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->wantTo('Create Article Tests');
// Not signed tests
$I->amOnRoute('article.create');
$I->seeCurrentUrlEquals('/auth/login');
// Sign in
$I->signIn();
// Create article
$I->amOnRoute('article.create');
$I->see('Create Article');
$I->fillField('form input[name=title]', 'New Article by FunctionalTester');
$I->selectOption('form select[name=category_id]', '1');
$I->fillField('form textarea[name=body]', 'bodybodybody \\n by FunctionalTester');
$I->click('form [type=submit]');
$I->seeCurrentUrlMatches('~^/article/(\\d+)$~');
示例2: FunctionalTester
<?php
use Mockery as m;
$I = new FunctionalTester($scenario);
$I->am('a guest');
$I->wantTo('sign up to build brighton');
$I->amOnPage('/');
$I->click('Become a Member');
$I->seeCurrentUrlEquals('/register');
$I->fillField('First Name', 'Jon');
$I->fillField('Family Name', 'Doe');
$I->fillField('Email', 'jondoe2@example.com');
$I->fillField('Password', '12345678');
$I->fillField(['name' => 'address[line_1]'], 'Street Address');
$I->fillField(['name' => 'address[postcode]'], 'BN3 1AN');
$I->fillField('Phone', '0123456789');
$I->fillField('Emergency Contact', 'Contact Details');
$I->attachFile('Profile Photo', 'test-image.png');
$I->checkOption('rules_agreed');
//$userImageService = m::mock('\BB\Helpers\UserImage');
//$userImageService->shouldReceive('uploadPhoto')->times(1);
//$this->app->instance('\BB\Helpers\UserImage',$userImageService);
//$I->haveEnabledFilters();
$I->click('Join');
//Make sure we are now on an account page with the new id
$I->seeCurrentUrlMatches('^/account/(\\d+)^');
$user = \BB\Entities\User::where('email', 'jondoe2@example.com')->first();
$I->assertNotEmpty($user->hash);
示例3: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->wantTo('Create User');
// Create user
$I->amOnPage('/auth/register');
$I->seeCurrentUrlEquals('/auth/register');
$I->fillField('form input[name=email]', time() . '@3n1website.com');
$I->fillField('form input[name=name]', time() . 'name');
$I->fillField('form input[name=password]', '3n1website');
$I->fillField('form input[name=password_confirmation]', '3n1website');
$I->click('form [type=submit]');
$I->seeCurrentUrlMatches('~^/home$~');
示例4: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->wantTo('Update Blog Tests');
// Not signed tests
$I->amOnRoute('blog.edit', 47);
$I->seeCurrentUrlEquals('/auth/login');
// Sign in
$I->signIn();
// Update Blog
$I->amOnRoute('blog.edit', 47);
$I->see('Edit Blog');
$I->fillField('form input[name=title]', 'New Blog by FunctionalTester');
$I->selectOption('form select[name=category_id]', '2');
$I->fillField('form textarea[name=body]', 'bodybodybody \\n by FunctionalTester');
$I->click('form [type=submit]');
$I->seeCurrentUrlMatches('~^/blog/(\\d+)$~');
$I->seeCurrentRouteIs('blog.show', 47);
示例5: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->wantTo('Update Topic Tests');
// Not signed tests
$I->amOnRoute('topic.edit', 1);
$I->seeCurrentUrlEquals('/auth/login');
// Sign in
$I->signIn();
// Update topic
$I->amOnRoute('topic.edit', 1);
$I->see('Edit Topic');
$I->fillField('form input[name=title]', 'New Topic by FunctionalTester');
$I->selectOption('form select[name=node_id]', '4');
$I->fillField('form textarea[name=body]', 'bodybodybody \\n by FunctionalTester');
$I->click('form [type=submit]');
$I->seeCurrentUrlMatches('~^/topic/(\\d+)$~');
$I->seeCurrentRouteIs('topic.show', 1);