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


PHP FunctionalTester::see方法代码示例

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


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

示例1: viewIssues

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function viewIssues(FunctionalTester $I)
 {
     $I->am('Developer User');
     $I->expectTo('view issues in projects I am one of the users');
     $user = $I->createUser(1, 2);
     $admin = $I->createUser(2, 4);
     $project1 = $I->createProject(1);
     $project2 = $I->createProject(2, [$user]);
     $issue1 = $I->createIssue(1, $admin, null, $project1);
     $issue2 = $I->createIssue(2, $admin, null, $project2);
     $comment1 = $I->createComment(1, $admin, $issue2);
     $I->amLoggedAs($user);
     $I->amOnAction('HomeController@getIndex');
     $I->see($project2->name, '#sidebar .project');
     $I->dontSee($project1->name, '#sidebar .project');
     $I->click($project2->name);
     $I->seeCurrentActionIs('ProjectController@getIndex', ['project' => $project2]);
     $I->seeLink($issue2->title);
     $I->dontSeeLink($issue1->title);
     $I->click($issue2->title);
     $I->seeCurrentActionIs('Project\\IssueController@getIndex', ['project' => $project2, 'issue' => $issue2]);
     $I->see($comment1->comment, '#comment' . $comment1->id . ' .content');
     $I->amOnAction('Project\\IssueController@getNew', ['project' => $project1]);
     $I->seeResponseCodeIs(401);
     $I->amOnAction('UserController@getIssues');
     $I->dontSeeLink($issue2->title);
     $I->dontSeeLink($issue1->title);
 }
开发者ID:oliverpool,项目名称:tinyissue,代码行数:35,代码来源:PermissionDeveloperCest.php

示例2: addIssueComment

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function addIssueComment(FunctionalTester $I)
 {
     $comment = 'Comment 1';
     $fileName1 = 'upload1.txt';
     $fileName2 = 'upload2.txt';
     $I->am('Manager User');
     $I->wantTo('add new comment to a project issue with attachments');
     $manager = $I->createUser(1, 3);
     $I->amLoggedAs($manager);
     $issue = $I->createIssue(1, $manager);
     $project = $issue->project;
     $I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
     $I->seeResponseCodeIs(200);
     $uri = $I->getApplication()->url->action('Project\\IssueController@postUploadAttachment', ['project' => $project]);
     $I->submitFormWithFileToUri('.new-comment form', $uri, ['upload' => [$fileName1, $fileName2]], ['comment' => $comment]);
     $I->seeResponseCodeIs(200);
     $I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
     $I->seeCurrentActionIs('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
     $I->see($comment, '.comment .content');
     $I->seeLink($fileName1);
     $I->seeLink($fileName2);
     $I->see($fileName1, '.attachments');
     $I->see($fileName2, '.attachments');
     $attachments = $issue->comments->first()->attachments;
     foreach ($attachments as $attachment) {
         $I->amOnAction('Project\\IssueController@getDisplayAttachment', ['project' => $project, 'issue' => $issue, 'attachment' => $attachment]);
         $I->seeResponseCodeIs(200);
     }
 }
开发者ID:oliverpool,项目名称:tinyissue,代码行数:36,代码来源:CrudAttachmentCest.php

示例3: updateIssue

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function updateIssue(FunctionalTester $I)
 {
     $I->am('Admin User');
     $I->wantTo('edit an existing project issue details');
     $admin = $I->createUser(1, 4);
     $developer1 = $I->createUser(2, 2);
     // developer
     $I->amLoggedAs($admin);
     $project = $I->createProject(1, [$developer1]);
     $I->amOnAction('Project\\IssueController@getNew', ['project' => $project]);
     $issue = $I->createIssue(1, $admin, $developer1, $project);
     $I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
     $I->seeLink('Issue 1');
     $I->dontSee(\Html::duration($issue->time_quote), '.issue-quote');
     $I->click('Issue 1', '.edit-issue');
     $I->seeCurrentActionIs('Project\\IssueController@getEdit', ['project' => $project, 'issue' => $issue]);
     $newTitle = 'Issue 1 update';
     $newTime = 3700;
     $I->fillField('title', $newTitle);
     $I->fillField('time_quote[h]', 1);
     $I->fillField('time_quote[s]', 100);
     $I->fillField('tag', 'type:tag1');
     $I->click(trans('tinyissue.update_issue'));
     $I->seeResponseCodeIs(200);
     $I->seeCurrentActionIs('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
     $I->seeLink($newTitle);
     $I->see(\Html::duration($newTime), '.issue-quote');
     $I->see('type', '.issue-tag');
     $I->see('tag1', '.issue-tag');
 }
开发者ID:oliverpool,项目名称:tinyissue,代码行数:37,代码来源:CrudIssueCest.php

示例4: seeLinksList

 public function seeLinksList(FunctionalTester $I)
 {
     $I->haveRecord('links', $this->linkRecord);
     $I->amOnPage(LinksPage::$URL);
     $I->see('Links');
     $I->see('/' . $this->link['uri']);
     $I->see($this->link['description']);
 }
开发者ID:mlanin,项目名称:go,代码行数:8,代码来源:LinksCest.php

示例5: it_validates_required_fields

 public function it_validates_required_fields(FunctionalTester $I)
 {
     //For coverage
     $I->amOnRoute(RegisterPage::$ROUTE);
     $I->submitForm(RegisterPage::$formId, [], 'Register');
     $I->see('The username field is required.');
     $I->see('The email field is required.');
     $I->see('The password field is required.');
     $I->dontSee('The name field is required.');
 }
开发者ID:v-radev,项目名称:laravel-auth-pack,代码行数:10,代码来源:RegisterFunctionalCest.php

示例6: requireAuthenticationForRoute

 public function requireAuthenticationForRoute(FunctionalTester $I)
 {
     $I->dontSeeAuthentication();
     $I->amOnPage('/secure');
     $I->seeCurrentUrlEquals('/auth/login');
     $I->see('Login');
     $I->amLoggedAs(User::firstOrNew($this->userAttributes));
     $I->amOnPage('/secure');
     $I->seeResponseCodeIs(200);
     $I->see('Hello World');
 }
开发者ID:jenky,项目名称:laravel-api-starter,代码行数:11,代码来源:AuthCest.php

示例7: requireAuthenticationForRoute

 public function requireAuthenticationForRoute(FunctionalTester $I)
 {
     $I->haveEnabledFilters();
     $I->amOnPage('/secure');
     $I->seeCurrentUrlEquals('/auth/login');
     $I->see('Login');
     $I->amLoggedAs(User::create($this->userAttributes));
     $I->amOnPage('/secure');
     $I->seeResponseCodeIs(200);
     $I->see('Hello World');
 }
开发者ID:resulaslan,项目名称:sample-l4-app,代码行数:11,代码来源:AuthCest.php

示例8: checkAdminPanel

 public function checkAdminPanel(FunctionalTester $I)
 {
     $I->submitForm($this->formId, $this->formParams('admin@example.org', '123123'));
     $I->see('Logout (admin)', 'form button[type=submit]');
     $I->seeLink('Administration');
     $I->click('Administration');
     $I->see('Users');
     $I->seeLink('CMS');
     $I->seeLink('RBAC');
     $I->seeLink('Settings Storage');
     $I->seeLink('Cron Schedule Log');
 }
开发者ID:yii2mod,项目名称:base,代码行数:12,代码来源:AdminLoginCest.php

示例9: submitFormSuccessfully

 public function submitFormSuccessfully(\FunctionalTester $I)
 {
     $I->submitForm('#contact-form', ['ContactForm[name]' => 'tester', 'ContactForm[email]' => 'tester@example.com', 'ContactForm[subject]' => 'test subject', 'ContactForm[body]' => 'test content', 'ContactForm[verifyCode]' => 'testme']);
     $I->seeEmailIsSent();
     $I->dontSeeElement('#contact-form');
     $I->see('Thank you for contacting us. We will respond to you as soon as possible.');
 }
开发者ID:chizdrel,项目名称:yii2-app-basic,代码行数:7,代码来源:ContactFormCest.php

示例10: checkValidLogin

 public function checkValidLogin(FunctionalTester $I)
 {
     $I->submitForm('#login-form', $this->formParams('admin@example.org', '123123'));
     $I->see('Logout (admin)', 'form button[type=submit]');
     $I->dontSeeLink('Login');
     $I->dontSeeLink('Signup');
 }
开发者ID:yii2mod,项目名称:base,代码行数:7,代码来源:LoginCest.php

示例11: getInternalErrorIfAssetsNotDumped

 public function getInternalErrorIfAssetsNotDumped(FunctionalTester $I)
 {
     $I->bootKernelWith();
     $I->amOnPage('/');
     $I->canSeeResponseCodeIs(500);
     $I->see('Manifest file not found');
 }
开发者ID:mariusbalcytis,项目名称:webpack-bundle,代码行数:7,代码来源:CompileCest.php

示例12: checkCorrectChangePassword

 public function checkCorrectChangePassword(FunctionalTester $I)
 {
     $I->submitForm('#login-form', $this->loginFormParams('test-user@example.com', '123123'));
     $I->click('My Account');
     $I->submitForm('#change-password-form', $this->resetPasswordFormParams('123456', '123456'));
     $I->see('Password has been updated.');
 }
开发者ID:yii2mod,项目名称:base,代码行数:7,代码来源:ChangePasswordViaAccountPageCest.php

示例13: seeContact

 /**
  * @param FunctionalTester $I
  */
 public function seeContact(FunctionalTester $I)
 {
     $I->wantToTest('if I can see the contact form as anonymous user');
     $I->amOnPage('/');
     $I->click(['link' => 'Contact']);
     $I->see('ContactForm');
 }
开发者ID:smartinmedia,项目名称:cunity-test,代码行数:10,代码来源:SmokeAnonymCest.php

示例14: canEditMicroblog

 public function canEditMicroblog(FunctionalTester $I)
 {
     $fake = Factory::create();
     $text = $fake->text();
     $id = $I->haveRecord('microblogs', ['user_id' => $this->user->id, 'text' => $text, 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'score' => 0]);
     $I->amOnRoute('microblog.save', [$id]);
     $I->see($text);
 }
开发者ID:furious-programming,项目名称:coyote,代码行数:8,代码来源:MicroblogsCest.php

示例15: createATicketSuccessfully

 public function createATicketSuccessfully(FunctionalTester $I)
 {
     $I->amLoggedAs(User::where('email', 'wayne@chargemasterplc.com')->first());
     $I->seeAuthentication();
     $I->amOnPage('/ticket/create');
     $I->see('Create Ticket', 'h1');
     $I->fillField('customer_name', 'Evie Martell');
     $I->fillField('customer_address', 'Luton, LU1 9AB');
     $I->fillField('customer_tel', '07710999888');
     $I->fillField('customer_email', 'evie.martell@chargemasterplc.com');
     $I->selectOption('select[name=type]', 'Fault');
     $I->selectOption('select[name=category_id]', '1');
     $I->fillField('post_serial', '2997');
     $I->fillField('description', 'Testing the post fault');
     $I->seeAuthentication();
     $I->click('Create');
     $I->see('Ticket created');
 }
开发者ID:richmartell,项目名称:laravel,代码行数:18,代码来源:TicketCest.php


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