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


PHP FunctionalTester::seeInTitle方法代码示例

本文整理汇总了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');
 }
开发者ID:phalcon,项目名称:forum,代码行数:11,代码来源:DeletePostsCest.php

示例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');
 }
开发者ID:kjmtrue,项目名称:forum,代码行数:11,代码来源:DeletePostsCest.php

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

示例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');
开发者ID:juanmanavarro,项目名称:x-file,代码行数:31,代码来源:CreateCategoryCept.php

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

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


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