本文整理汇总了PHP中FunctionalTester::seeInTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionalTester::seeInTitle方法的具体用法?PHP FunctionalTester::seeInTitle怎么用?PHP FunctionalTester::seeInTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FunctionalTester
的用法示例。
在下文中一共展示了FunctionalTester::seeInTitle方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteADiscussion
public function deleteADiscussion(FunctionalTester $I, UserSteps $userSteps)
{
$userId = $userSteps->amRegularUser();
$catId = $userSteps->haveCategory();
$postId = $userSteps->havePost(['title' => 'Is there a way to validate only some fields?', 'users_id' => $userId, 'categories_id' => $catId]);
$I->amOnPage("/discussion/{$postId}/abc");
$I->seeInTitle('Is there a way to validate only some fields? - Discussion');
$I->seeElement(['css' => 'a.btn-delete-post']);
$I->click(['css' => 'a.btn-delete-post']);
$I->see('Discussion was successfully deleted', '//body/div[1]/div/div/div');
}
示例2: deleteADiscussion
public function deleteADiscussion(FunctionalTester $I, UserSteps $userSteps)
{
$userId = $userSteps->amRegularUser();
$catId = $userSteps->haveCategory(['name' => 'Some Category', 'slug' => 'some-category', 'description' => 'A description of the category']);
$postId = $userSteps->havePost(['title' => 'Is there a way to validate only some fields?', 'content' => 'as I see, only the form itself can be validated. It validates if all fields passes, right?' . ' Well, this time I have to validate 3 fields - but those fields what passes, should go inside database.' . ' With the original schema, I cant do that', 'users_id' => $userId, 'slug' => 'is-there-a-way-to-validate-only-some-fields', 'categories_id' => $catId]);
$I->amOnPage("/discussion/{$postId}/is-there-a-way-to-validate-only-some-fields");
$I->seeInTitle('Is there a way to validate only some fields? - Discussion - Phalcon Framework');
$I->seeElement(['css' => 'a.btn-delete-post']);
$I->click(['css' => 'a.btn-delete-post']);
$I->see('Discussion was successfully deleted', '//body/div[1]/div/div/div');
}
示例3: FunctionalTester
<?php
/**
* @var \Codeception\Scenario $scenario
*/
$I = new FunctionalTester($scenario);
$I->wantTo('perform shadow login as first user');
$I->haveInSession('identity', 1);
$I->haveInSession('identity-name', 'Phalcon');
$I->amOnPage('/');
$I->seeInTitle('Discussions - Phalcon Framework');
$I->see('Start a Discussion');
示例4: FunctionalTester
<?php
$I = new FunctionalTester($scenario);
$I->wantTo('create a category');
$I->am('knowledge admin');
$I->amOnPage('/categories/create');
$I->seeInTitle('Create category');
// form empty
$I->amGoingTo('test validation');
$I->click('Create');
$I->dontSeeRecord('categories', []);
$I->seeCurrentUrlEquals('/categories/create');
$I->see('The name field is required');
$I->see('The slug field is required');
// only empty name
$I->amGoingTo('test name validation');
$I->fillField('slug', 'libro');
$I->fillField('active', 1);
$I->click('Create');
$I->dontSeeRecord('categories', ['slug' => 'libro', 'active' => 1]);
$I->seeCurrentUrlEquals('/categories/create');
$I->see('The name field is required', '.error');
$I->seeInField('slug', 'libro');
$I->dontSee('The slug field is required');
// all form filled
$I->fillField('name', 'Libro');
$I->fillField('slug', 'libro');
$I->fillField('active', 1);
$I->click('Create');
$I->haveRecord('categories', ['name' => 'Libro', 'slug' => 'libro', 'active' => 1]);
$I->seeCurrentUrlEquals('/categories');
示例5: FunctionalTester
<?php
/**
* @var Codeception\Scenario $scenario
*/
$I = new FunctionalTester($scenario);
$I->wantTo('perform shadow login as first user');
$I->haveInSession('identity', 1);
$I->haveInSession('identity-name', 'Phalcon');
$I->amOnPage('/');
$I->seeInTitle('Discussions - ');
$I->see('Start a Discussion');
示例6: FunctionalTester
<?php
/**
* @var \Codeception\Scenario $scenario
*/
$I = new FunctionalTester($scenario);
$I->wantTo('open index page of site');
$I->amOnPage('/');
$I->seeInTitle('Phalcon Demo Application | Welcome');
$I->see("This is a Phalcon Demo Application. Please don't provide us any personal information. Thanks!");
$I->see('Log In/Sign Up');
$I->see('Phalcon Demo Application', 'h1');