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


PHP AcceptanceTester::grabValueFrom方法代码示例

本文整理汇总了PHP中AcceptanceTester::grabValueFrom方法的典型用法代码示例。如果您正苦于以下问题:PHP AcceptanceTester::grabValueFrom方法的具体用法?PHP AcceptanceTester::grabValueFrom怎么用?PHP AcceptanceTester::grabValueFrom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AcceptanceTester的用法示例。


在下文中一共展示了AcceptanceTester::grabValueFrom方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dashboardWithoutPermissionRedirectsToHomepageTest

 /**
  * Test that a user with no access rights to Dashboard gets redirected to
  * the hmoepage.
  *
  * Inspired by the Atari game Lemmings and the Eddie Vedder commment:
  * "Longest song title in the Pearl Jam catalogue", referencing the song
  * "Elderly Woman Behind the Counter in a Small Town", and the name of the
  * particular unit test method until Bolt 2.3…
  *
  * @param \AcceptanceTester $I
  */
 public function dashboardWithoutPermissionRedirectsToHomepageTest(\AcceptanceTester $I)
 {
     $I->wantTo('Set permissions/global/dashboard to empty and be redirected to the homepage');
     // Set up the browser
     $I->setCookie($this->tokenNames['authtoken'], $this->cookies[$this->tokenNames['authtoken']]);
     $I->setCookie($this->tokenNames['session'], $this->cookies[$this->tokenNames['session']]);
     $I->amOnPage('/bolt/file/edit/config/permissions.yml');
     $yaml = $I->getLemmingsPermissions();
     $I->fillField('#form_contents', $yaml);
     $token = $I->grabValueFrom('#form__token');
     $I->sendAjaxPostRequest('/bolt/file/edit/config/permissions.yml', ['form[_token]' => $token, 'form[contents]' => $yaml]);
     // Verify we go to the dashboard and end up on the homepage
     $I->amOnPage('/bolt');
     $I->see('A sample site');
     $I->see('Recent Pages');
     $I->dontSee('Recent Resources');
     $I->see('A Page I Made', 'h1');
     $I->see('Built with Bolt, tested with Codeception', 'footer');
 }
开发者ID:d-m-,项目名称:bolt,代码行数:30,代码来源:BackendLemmingsCest.php

示例2: configureInstalledExtensions

 /**
  * Test that the 'developer' user can configure installed extensions.
  *
  * @param \AcceptanceTester $I
  */
 public function configureInstalledExtensions(\AcceptanceTester $I, \Codeception\Scenario $scenario)
 {
     $I->wantTo("See that the 'developer' user can configure installed extensions.");
     // Set up the browser
     $I->setCookie($this->tokenNames['authtoken'], $this->cookies[$this->tokenNames['authtoken']]);
     $I->setCookie($this->tokenNames['session'], $this->cookies[$this->tokenNames['session']]);
     $I->amOnPage('/bolt/files/config/extensions');
     $I->see('testerevents.bolt.yml', Locator::href('/bolt/file/edit/config/extensions/testerevents.bolt.yml'));
     $I->click('testerevents.bolt.yml', Locator::href('/bolt/file/edit/config/extensions/testerevents.bolt.yml'));
     $I->see('# Sit back and breathe', 'textarea');
     $I->see('its_nice_to_know_you_work_alone: true', 'textarea');
     // Edit the field
     $twig = $I->grabTextFrom('#form_contents', 'textarea');
     $twig .= PHP_EOL . "# Let's make this perfectly clear";
     $twig .= PHP_EOL . 'theres_no_secrets_this_year: true' . PHP_EOL;
     $I->fillField('#form_contents', $twig);
     $token = $I->grabValueFrom('#form__token');
     $I->sendAjaxPostRequest('/bolt/file/edit/config/extensions/testerevents.bolt.yml', ['form[_token]' => $token, 'form[contents]' => $twig]);
     $I->amOnPage('/bolt/file/edit/config/extensions/testerevents.bolt.yml');
     $I->see("# Let's make this perfectly clear", 'textarea');
     $I->see('theres_no_secrets_this_year: true', 'textarea');
 }
开发者ID:Boorj,项目名称:bolt,代码行数:27,代码来源:BackendDeveloperCest.php

示例3: AcceptanceTester

<?php

//tests\acceptance\003_SimilarOrganizationName.php
$I = new AcceptanceTester($scenario);
$I->wantTo('Check similar organization name function');
$I->amOnPage('/register/staff');
$I->fillField("#staff_registration_organization_orgName", "Glenshire Maronite Fund");
$I->pressKey("#staff_registration_organization_orgName", "");
$I->waitForJS("return \$.active == 0;", 3);
$I->see("Glenshire Marmot Fund");
$I->checkOption("#orgNotListed");
$I->waitForJS("return \$.active == 0;", 3);
$I->dontSee("Glenshire Marmot Fund");
$orgName = $I->grabValueFrom("#staff_registration_organization_orgName");
$this->assertEquals($orgName, "Glenshire Maronite Fund");
开发者ID:truckee,项目名称:match,代码行数:15,代码来源:003_SimilarOrganizationNameCept.php

示例4: date

 public function systeminfo_ログ表示(\AcceptanceTester $I)
 {
     $I->wantTo('EA0806-UC01-T01 ログ表示');
     // 表示
     $config = Fixtures::get('config');
     $I->amOnPage('/' . $config['admin_route'] . '/setting/system/log');
     $I->see('システム設定EC-CUBE ログ表示', '#main .page-header');
     $log = $I->grabValueFrom(['id' => 'admin_system_log_files']);
     $expect = "site_" . date('Y-m-d') . ".log";
     $I->assertEquals($expect, $log);
     $I->fillField(['id' => 'line-max'], '1');
     $I->click(['css' => '#form1 button']);
     $I->dontSeeElement(['css' => '#main .container-fluid .box table tbody tr:nth-child(2)']);
 }
开发者ID:nanasess,项目名称:eccube-codeception,代码行数:14,代码来源:EA08SysteminfoCest.php

示例5: deleteCategoryTickConfirmation

 /**
  * @depends deleteCategoryNoTickConfirmation
  */
 public function deleteCategoryTickConfirmation(AcceptanceTester $I)
 {
     $I->logInAsAnAdmin();
     $I->makeCategoryAvailable(CI_EDITABLE_CATEGORY_ID);
     $I->amOnEditCategory(CI_EDITABLE_CATEGORY_ID);
     $title = $I->grabValueFrom('title');
     $I->amOnAdminHome();
     $I->see($title);
     $I->amOnPage('/challenges');
     $I->see($title);
     $I->amOnPage('/scores');
     $I->see($title);
     $I->amOnEditCategory(CI_EDITABLE_CATEGORY_ID);
     $I->checkOption('#delete_confirmation');
     $I->click('Delete category');
     $I->amOnAdminHome();
     $I->dontSee($title);
     $I->amOnPage('/challenges');
     $I->dontSee($title);
     $I->amOnPage('/scores');
     $I->dontSee($title);
     $I->amOnEditCategory(CI_EDITABLE_CATEGORY_ID);
     $I->see('Error');
     $I->see('No category found with this ID');
 }
开发者ID:aallen,项目名称:mellivora,代码行数:28,代码来源:ManageCategoryCest.php


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