當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。