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


PHP AcceptanceTester类代码示例

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


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


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