本文整理汇总了PHP中FunctionalTester::seeCurrentUrlEquals方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionalTester::seeCurrentUrlEquals方法的具体用法?PHP FunctionalTester::seeCurrentUrlEquals怎么用?PHP FunctionalTester::seeCurrentUrlEquals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FunctionalTester
的用法示例。
在下文中一共展示了FunctionalTester::seeCurrentUrlEquals方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _before
public function _before(FunctionalTester $I)
{
$this->tester = ['name' => 'Tester', 'email' => 'tester+' . str_random(8) . '@stellardestiny.online', 'password' => 'password'];
$I->amOnPage('/');
$I->click('Register');
$I->seeCurrentUrlEquals('/auth/register');
}
示例2: cantCreateDuplicateKeyEntry
public function cantCreateDuplicateKeyEntry(FunctionalTester $I)
{
$I->am('an equipment team member');
$I->wantTo('make sure I cant create duplicate entries');
//Load and login a known member
$I->loginEquipmentTeamMember();
$I->amOnPage('/equipment');
$I->canSee('Record a new item');
$name = $this->faker->word;
$slug = substr($this->faker->slug, 0, 10);
//First item
$I->click('Record a new item');
$I->fillField('Name', $name);
$I->fillField('Slug', $slug);
$I->click('Save');
$I->seeCurrentUrlEquals('/equipment/' . $slug . '/edit');
/*
//Second item
$I->click('Record a new item');
$I->fillField('Name', $name);
$I->fillField('Key', $slug);
$I->assertTrue(
$I->seeExceptionThrown('BB\Exceptions\FormValidationException', function() use ($I){
$I->click('Save');
})
);
*/
}
示例3: should_correctly_route_to_index
/** @test */
public function should_correctly_route_to_index(FunctionalTester $I)
{
// given .. I am on index page
$I->amOnPage('/');
// then ... I should see correct route
$I->seeCurrentUrlEquals('/');
}
示例4: openPageByRoute
public function openPageByRoute(FunctionalTester $I)
{
$I->amOnRoute('front.contact');
$I->see('Contact Us');
$I->see('Send us a message and let us know how we can help.');
$I->seeCurrentUrlEquals('/contact-us');
}
示例5: redirectToLogin
/**
* @param FunctionalTester $I
*
* @return void
*/
public function redirectToLogin(FunctionalTester $I)
{
$I->wantTo('be redirected to login page.');
$I->amOnAction('HomeController@getDashboard');
$I->dontSeeAuthentication();
$I->see('Login');
$I->seeCurrentUrlEquals('');
}
示例6: trySigninWithInvalidCredentials
public function trySigninWithInvalidCredentials(FunctionalTester $I)
{
$I->wantTo('Login as user with invalid credentials');
$I->dontSeeAuthentication();
$I->amOnPage('/login');
$I->fillField('identifier', 'spectator');
$I->fillField('password', 'invalid');
$I->click('button[type=submit]');
$I->seeCurrentUrlEquals('/login');
$I->dontSeeAuthentication();
}
示例7: requireAuthenticationForRoute
public function requireAuthenticationForRoute(FunctionalTester $I)
{
$I->dontSeeAuthentication();
$I->amOnPage('/secure');
$I->seeCurrentUrlEquals('/auth/login');
$I->see('Login');
$I->amLoggedAs(User::firstOrNew($this->userAttributes));
$I->amOnPage('/secure');
$I->seeResponseCodeIs(200);
$I->see('Hello World');
}
示例8: requireAuthenticationForSecureRoute
public function requireAuthenticationForSecureRoute(FunctionalTester $I)
{
$I->dontSeeAuthentication();
$I->amOnPage(LinksPage::$URL);
$I->seeCurrentUrlEquals(LoginPage::$URL);
$I->see(LoginPage::$title);
LoginPage::of($I)->loginByCredentials(env('LDAP_ADMIN_USER'), env('LDAP_ADMIN_PASSWORD'));
$I->amOnPage(LinksPage::$URL);
$I->seeResponseCodeIs(200);
$I->see(LinksPage::$title);
}
示例9: requireAuthenticationForRoute
public function requireAuthenticationForRoute(FunctionalTester $I)
{
$I->haveEnabledFilters();
$I->amOnPage('/secure');
$I->seeCurrentUrlEquals('/auth/login');
$I->see('Login');
$I->amLoggedAs(User::create($this->userAttributes));
$I->amOnPage('/secure');
$I->seeResponseCodeIs(200);
$I->see('Hello World');
}
示例10: financeMemberCanVisitPaymentPage
public function financeMemberCanVisitPaymentPage(FunctionalTester $I)
{
$I->am('a member of the finance group');
$I->wantTo('make sure I can view the payments page');
//Load and login a known member
$user = User::find(3);
$role = Role::findByName('finance');
$role->users()->attach($user->id);
Auth::login($user);
$I->amOnPage('/payments');
$I->seeCurrentUrlEquals('/payments');
$I->see('Payments');
}
示例11: tryToResetPasswordWithValidToken
public function tryToResetPasswordWithValidToken(FunctionalTester $I)
{
$I->seeRecord('password_resets', ['email' => 'admin@site.com']);
$I->wantTo('Reset my password invalid token');
$I->amOnPage('/password/reset/reset-token');
$I->fillField('email', 'admin@site.com');
$I->fillField('password', '123456');
$I->fillField('password_confirmation', '123456');
$I->click('button[type=submit]');
$I->dontSeeRecord('password_resets', ['email' => 'admin@site.com']);
$I->seeAuthentication();
$I->seeCurrentUrlEquals('/admin/dashboard');
}
示例12: tryRegisterDesiredInputWithDefaultRole
public function tryRegisterDesiredInputWithDefaultRole(FunctionalTester $I)
{
$I->haveRecord('roles', ['id' => 2, 'name' => 'Spectator', 'slug' => 'spectator', 'landing' => 'admin/profile', 'is_default' => true, 'created_at' => new DateTime(), 'updated_at' => new DateTime()]);
$I->wantTo('Register a user with desired input');
$I->amOnPage('/register');
$I->fillField('username', 'usertest');
$I->fillField('email', 'usertest@email.com');
$I->fillField('password', '123456');
$I->fillField('password_confirmation', '123456');
$I->click('button[type=submit]');
$I->seeRecord('users', ['username' => 'usertest']);
$I->seeCurrentUrlEquals('/login');
}
示例13: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->wantTo('I am Admin and Delete a new currency');
$I->dontSeeAuthentication();
$I->amLoggedAs(['email' => 'admin@admin.com', 'password' => 'admin']);
$I->seeAuthentication();
$I->amOnPage('/settings/currency/create');
//when
$form = ['name' => 'Mau', 'symbol' => '@'];
//And
$id = $I->haveRecord('currencys', ['name' => 'Mau', 'symbol' => '@']);
//And
$I->amOnPage('/settings/currency/' . $id);
//then
$I->see('Delete');
//When
$I->submitForm('//form', ['id' => $id], 'Delete');
$I->seeCurrentUrlEquals('/settings/currency');
示例14: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->am('a Larabook member');
$I->wantTo('post statuses to my profile');
$I->signIn();
$I->amOnPage('statuses');
$I->postAStatus('My first post.');
$I->seeCurrentUrlEquals('/statuses');
$I->see('My first post');
示例15: FunctionalTester
<?php
use Laracasts\TestDummy\Factory;
$I = new FunctionalTester($scenario);
$I->am('a USC Todo member');
$I->wantTo('post a new project');
$email = 'foo@example.com';
$password = 'foobar';
Factory::create('App\\User', ['email' => $email, 'password' => $password]);
$I->amOnPage('/auth/login');
$I->fillField('email', $email);
$I->fillField('password', $password);
$I->click('Login!');
//$I->signIn();
$I->seeCurrentUrlEquals('/projects');