• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP AcceptanceTester类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ClearAllCach

 /**
  * Clear cache work only at admin panel
  * @param AcceptanceTester $I Controller 
  */
 public static function ClearAllCach($I)
 {
     $I->amOnPage('/admin');
     $I->click(NavigationBarPage::$System);
     $I->click(NavigationBarPage::$SystemClearAllCach);
     $I->wait(3);
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:11,代码来源:InitTest.php


示例2: testIfICantCreateAnEventWithoutBeingAuthenticated

 public function testIfICantCreateAnEventWithoutBeingAuthenticated(AcceptanceTester $I)
 {
     $I->am('guest');
     $I->wantTo('see that i can\'t create an event');
     $I->amOnPage('event/create');
     $I->canSee('have to be logged in', '.alert-danger');
 }
开发者ID:WeCamp,项目名称:Meetspire,代码行数:7,代码来源:EventsCest.php


示例3: testAPI

 public function testAPI(AcceptanceTester $I)
 {
     $I->wantTo('test the API');
     $data = new stdClass();
     $data->contact = new stdClass();
     $data->contact->email = $this->faker->safeEmail;
     $clientId = $this->createEntity('client', $data);
     $this->listEntities('client');
     $data = new stdClass();
     $data->client_id = $clientId;
     $data->description = $this->faker->realText(100);
     $this->createEntity('task', $data);
     $this->listEntities('task');
     $lineItem = new stdClass();
     $lineItem->qty = $this->faker->numberBetween(1, 10);
     $lineItem->cost = $this->faker->numberBetween(1, 10);
     $data = new stdClass();
     $data->client_id = $clientId;
     $data->invoice_items = [$lineItem];
     $invoiceId = $this->createEntity('invoice', $data);
     $this->listEntities('invoice');
     $data = new stdClass();
     $data->invoice_id = $invoiceId;
     $data->amount = 1;
     $this->createEntity('payment', $data);
     $this->listEntities('payment');
     $this->listEntities('account');
 }
开发者ID:magicians,项目名称:invoiceninja,代码行数:28,代码来源:APICest.php


示例4: submitTheForm

 private function submitTheForm(AcceptanceTester $I, $attributes)
 {
     $I->waitForElement('form', 2);
     $I->fillField('form #title', $attributes['title']);
     $I->fillField('form #content', $attributes['content']);
     $I->click('form .btn-primary');
 }
开发者ID:CENTRUM21,项目名称:laravel-apz,代码行数:7,代码来源:ArticleCest.php


示例5: loginWithoutEmail

 function loginWithoutEmail(\AcceptanceTester $I, \Page\Login $loginPage)
 {
     $I->wantTo("Check login with No Email and Valid Password");
     $loginPage->loginWithPasswordOnly('debby');
     $I->seeElement('div[class = "control-group email error"]');
     $I->dontSeeInCurrentUrl('activities');
 }
开发者ID:suj24,项目名称:TestDemo,代码行数:7,代码来源:LoginTestCest.php


示例6: formManagerOpensNewForm

 /**
  * Tests that form manager opens on the new form page
  *
  * @since 7.0
  * @param \GLM\Tests\Acceptance\AcceptanceTester $I The current actor.
  */
 public function formManagerOpensNewForm(AcceptanceTester $I)
 {
     $I->wantTo('Ensure the form manager opens in the new form page');
     $I->amOnPage(admin_url('post-new.php?post_type=ccf_form'));
     $I->click('Manage Form');
     $I->see('Click on a field to edit it');
 }
开发者ID:connorjburton,项目名称:custom-contact-forms,代码行数:13,代码来源:FormManagerCest.php


示例7: setLoginCookies

 /**
  * @param AcceptanceTester $I
  */
 protected function setLoginCookies(\AcceptanceTester $I)
 {
     $authTokenName = (string) $this->tokenNames['authtoken'];
     $sessionTokenName = (string) $this->tokenNames['session'];
     $I->setCookie($this->tokenNames['authtoken'], $this->cookies[$authTokenName]);
     $I->setCookie($this->tokenNames['session'], $this->cookies[$sessionTokenName]);
 }
开发者ID:robbert-vdh,项目名称:bolt,代码行数:10,代码来源:AbstractAcceptanceTest.php


示例8: loginWithInvalidCredentials

 public function loginWithInvalidCredentials(AcceptanceTester $I)
 {
     $I->amOnPage('/login');
     $I->click('Login');
     $I->seeCurrentUrlEquals('/login');
     $I->see('Invalid Credentials', '.flash');
 }
开发者ID:joyhuang-note,项目名称:laravel-testing-decoded,代码行数:7,代码来源:LoginCest.php


示例9: testShowAction

 public function testShowAction(AcceptanceTester $I)
 {
     $I->wantTo('too see inside the dashboard area');
     $I->amOnPage('/dashboard');
     $I->see('a placeholder for dashboard');
     $I->wait(3);
 }
开发者ID:Soolan,项目名称:mava-project,代码行数:7,代码来源:DashboardControllerCest.php


示例10: viewHomepage

 public function viewHomepage(AcceptanceTester $I)
 {
     $I->wantTo('view the homepage');
     $I->amOnPage('/');
     $I->see('Zen Kommerce');
     //$I->dontSeeHttpHeader('Set-Cookie');
 }
开发者ID:inklabs,项目名称:kommerce-templates,代码行数:7,代码来源:HomepageCest.php


示例11: tryToTest

 public function tryToTest(AcceptanceTester $I)
 {
     $I->expectARequestToRemoteServiceWithAResponse(Phiremock::on(A::getRequest()->andUrl(Is::equalTo('/some/url')))->then(Respond::withStatusCode(203)->andBody('I am a response')));
     $response = file_get_contents('http://localhost:18080/some/url');
     $I->assertEquals('I am a response', $response);
     $I->seeRemoteServiceReceived(1, A::getRequest()->andUrl(Is::equalTo('/some/url')));
 }
开发者ID:mcustiel,项目名称:phiremock-codeception-extension,代码行数:7,代码来源:BasicTestCest.php


示例12: it_validates_required_fields

 public function it_validates_required_fields(AcceptanceTester $I)
 {
     $I->amOnRoute(LoginPage::$ROUTE);
     $I->submitForm(LoginPage::$formId, [], 'Login');
     $I->see('The username field is required.');
     $I->see('The password field is required.');
 }
开发者ID:v-radev,项目名称:laravel-auth-pack,代码行数:7,代码来源:LoginAcceptanceCest.php


示例13: startAConversation

 /**
  * @param AcceptanceTester $I
  */
 public function startAConversation(AcceptanceTester $I)
 {
     $I->wantToTest('if I can start a conversation');
     $I->amOnPage('/messages');
     $I->click('#startConversation');
     $I->see('Send a message');
 }
开发者ID:smartinmedia,项目名称:cunity-test,代码行数:10,代码来源:ConversationCest.php


示例14: it_prevents_guests_from_seeing_profiles

 public function it_prevents_guests_from_seeing_profiles(AcceptanceTester $I)
 {
     $user = $this->userActor->create();
     $I->amOnRoute('profile.show', $user->username);
     $I->seeInCurrentUrl('auth/login');
     $I->seeCurrentRouteIs('auth.login');
     $I->dontSee('Profile of user');
 }
开发者ID:v-radev,项目名称:laravel-auth-pack,代码行数:8,代码来源:ProfileAcceptanceCest.php


示例15: createAnExpectationWithRegexReplacementFromBodyAndUrl

 public function createAnExpectationWithRegexReplacementFromBodyAndUrl(AcceptanceTester $I)
 {
     $expectation = PhiremockClient::on(A::postRequest()->andUrl(Is::matching('/&test=(\\d+)/'))->andBody(Is::matching('/a tomato (\\d+)/')))->then(Respond::withStatusCode(200)->andBody('the numbers are ${url.1} and ${body.1}'));
     $this->phiremock->createExpectation($expectation);
     $I->sendPOST('/potato?param1=123&test=456', 'this is a tomato 3kg it weights');
     $I->seeResponseCodeIs('200');
     $I->seeResponseContains('the numbers are 456 and 3');
 }
开发者ID:mcustiel,项目名称:phiremock,代码行数:8,代码来源:ReplacementCest.php


示例16: it_should_render_extended_shortcode

 /**
  * @test
  * it should render extended shortcode
  */
 public function it_should_render_extended_shortcode(\AcceptanceTester $I)
 {
     $content = 'Lorem ipsum [idlikethis]Some idea of mine[/idlikethis]';
     $I->havePostInDatabase(['post_name' => 'foo', 'post_content' => $content]);
     $I->amOnPage('/foo');
     $text = "Some idea of mine";
     $I->seeElement('.idlikethis-button[data-text="' . $text . '"] button');
 }
开发者ID:lucatume,项目名称:idlikethis,代码行数:12,代码来源:ShortcodeCest.php


示例17: i_can_edit_the_user

 public function i_can_edit_the_user(\AcceptanceTester $I)
 {
     $I->clickNode('#model1-node');
     // $I->fillField('text','[email protected]');
     // $I->click('button.dvs-sidebar-save-group');
     // $I->wait(self::WAIT_TIME);
     // $I->seeInDatabase('users', array('email' => '[email protected]'));
 }
开发者ID:alpas29,项目名称:cms,代码行数:8,代码来源:EditTheUserCest.php


示例18: comment

 public function comment(AcceptanceTester $I)
 {
     $I->wantTo('post a comment');
     $I->amOnPage('/Mikroblogi');
     $I->canSeeElement('.comment-submit');
     //        $I->submitForm('.comment-submit', ['text' => 'To jest unikalny komentarz']);
     //        $I->wait(1);
     //        $I->canSee('To jest unikalny komentarz');
 }
开发者ID:furious-programming,项目名称:coyote,代码行数:9,代码来源:MicroblogCest.php


示例19: loginAdminUserTest

 /**
  * Login the admin user using his email
  *
  * @param \AcceptanceTester $I
  */
 public function loginAdminUserTest(\AcceptanceTester $I)
 {
     $I->wantTo('log into the backend as Admin with email');
     $I->loginWithEmailAs($this->user['admin']);
     $this->saveLogin($I);
     $I->see('Dashboard');
     $I->see('Configuration', Locator::href('/bolt/users'));
     $I->see("You've been logged on successfully.");
 }
开发者ID:robbert-vdh,项目名称:bolt,代码行数:14,代码来源:BackendAdminLoginWithEmailCest.php


示例20: strtotime

 public function authentication_最終ログイン日時確認(\AcceptanceTester $I)
 {
     $I->wantTo('EA0201-UC01-T01 最終ログイン日時確認');
     $I->click(['css' => '.navbar-menu .dropdown-toggle']);
     $loginText = $I->grabTextFrom(['css' => '.navbar-menu .dropdown-menu']);
     $lastLogin = preg_replace('/.*(\\d{4}\\/\\d{2}\\/\\d{2} \\d{2}:\\d{2}).*/s', '$1', $loginText);
     // 表示されるログイン日時では秒数がわからないため、タイミングによっては1分ちょっと変わる
     $I->assertTrue(strtotime('now') - strtotime($lastLogin) < 70, '最終ログイン日時が正しい');
 }
开发者ID:EC-CUBE,项目名称:eccube-codeception,代码行数:9,代码来源:EA02AuthenticationCest.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Acceso类代码示例发布时间:2022-05-23
下一篇:
PHP AcademicTermPeriod类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap