當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FunctionalTester::seeCurrentActionIs方法代碼示例

本文整理匯總了PHP中FunctionalTester::seeCurrentActionIs方法的典型用法代碼示例。如果您正苦於以下問題:PHP FunctionalTester::seeCurrentActionIs方法的具體用法?PHP FunctionalTester::seeCurrentActionIs怎麽用?PHP FunctionalTester::seeCurrentActionIs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FunctionalTester的用法示例。


在下文中一共展示了FunctionalTester::seeCurrentActionIs方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: viewIssues

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function viewIssues(FunctionalTester $I)
 {
     $I->am('Manager User');
     $I->expectTo('view issues in all projects');
     $user = $I->createUser(1, 3);
     $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(200);
     $I->click(trans('tinyissue.projects'));
     $I->see($project1->name);
     $I->see($project2->name);
 }
開發者ID:oliverpool,項目名稱:tinyissue,代碼行數:35,代碼來源:PermissionManagerCest.php

示例2: 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

示例3: 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

示例4: cantEditClosedIssue

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function cantEditClosedIssue(FunctionalTester $I)
 {
     $I->am('Admin User');
     $I->wantTo('not be able to edit closed issue');
     $admin = $I->createUser(1, 4);
     $developer1 = $I->createUser(2, 2);
     // developer
     $I->amLoggedAs($admin);
     $project = $I->createProject(1, [$developer1]);
     $issue = $I->createIssue(1, $admin, $developer1, $project);
     $I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
     $I->click('Issue 1', '.edit-issue');
     $I->seeCurrentActionIs('Project\\IssueController@getEdit', ['project' => $project, 'issue' => $issue]);
     $I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
     $I->click(trans('tinyissue.close_issue'), '.close-issue');
     $I->seeLink(trans('tinyissue.reopen_issue'));
     $I->click('Issue 1', '.edit-issue');
     $I->seeResponseCodeIs(200);
     $I->seeCurrentActionIs('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
     $I->see(trans('tinyissue.cant_edit_closed_issue'));
 }
開發者ID:oliverpool,項目名稱:tinyissue,代碼行數:28,代碼來源:IssueCest.php

示例5: deleteUser

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function deleteUser(FunctionalTester $I)
 {
     $I->am('Admin User');
     $I->wantTo('delete an existing user details');
     $admin = $I->createUser(1, 4);
     $user = $I->createUser(2, 1);
     $user1 = $I->createUser(3, 2);
     $I->amLoggedAs($admin);
     $I->amOnAction('Administration\\UsersController@getDelete', ['user' => $user]);
     $I->seeCurrentActionIs('Administration\\UsersController@getIndex');
     $I->dontSee($user->fullname);
     $I->see($user1->fullname);
 }
開發者ID:oliverpool,項目名稱:tinyissue,代碼行數:20,代碼來源:CrudUserCest.php

示例6: deleteProject

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function deleteProject(FunctionalTester $I)
 {
     $I->am('Admin User');
     $I->wantTo('delete an existing project details');
     $project = $I->createProject(1);
     $admin = $I->createUser(1, 4);
     $I->amLoggedAs($admin);
     $I->amOnAction('ProjectController@getEdit', ['project' => $project]);
     $I->click(trans('tinyissue.delete_something', ['name' => $project->name]));
     $I->seeCurrentActionIs('ProjectsController@getIndex');
     $I->dontSeeLink('Project 1');
     $I->amOnAction('ProjectsController@getIndex', ['status' => Project::STATUS_ARCHIVED]);
     $I->dontSeeLink('Project 1');
     $I->dontSeeRecord($project->getTable(), ['name' => 'Project 1']);
 }
開發者ID:oliverpool,項目名稱:tinyissue,代碼行數:22,代碼來源:CrudProjectCest.php

示例7: addComment

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function addComment(FunctionalTester $I)
 {
     $I->am('Developer User');
     $I->wantTo('add new comment to an issue');
     $admin = $I->createUser(2, 4);
     $I->amLoggedAs($admin);
     $project = $I->createProject(1, [$admin]);
     $issue = $I->createIssue(1, $admin, $admin, $project);
     $I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
     $I->fillField('comment', 'Comment one');
     $I->click(trans('tinyissue.comment'));
     $I->seeResponseCodeIs(200);
     $comment = $issue->comments->last();
     $I->seeCurrentActionIs('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue->id . '#comment' . $comment->id]);
     $I->see('Comment one', '.comment .content');
 }
開發者ID:oliverpool,項目名稱:tinyissue,代碼行數:23,代碼來源:CrudIssueCommentCest.php

示例8: updateTag

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function updateTag(FunctionalTester $I)
 {
     $I->am('Admin User');
     $I->wantTo('edit an existing tag');
     $tag = (new Tag())->where('group', '=', false)->get()->random(1);
     $data = ['name' => 'tag updated'];
     $tagName = $tag->name;
     $I->amLoggedAs($I->createUser(1, 4));
     $I->amOnAction('Administration\\TagsController@getIndex');
     $I->click($this->_editTagSelector($tagName));
     $I->seeCurrentActionIs('Administration\\TagsController@getEdit', ['tag' => $tag]);
     $I->submitForm('form', $data);
     $I->amOnAction('Administration\\TagsController@getIndex');
     $I->see($data['name'], $this->_editTagSelector($data['name']));
     $I->dontSee($data['name'], $this->_editTagSelector($tagName));
 }
開發者ID:oliverpool,項目名稱:tinyissue,代碼行數:23,代碼來源:CrudTagCest.php

示例9: viewOverview

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function viewOverview(FunctionalTester $I)
 {
     $I->am('Admin User');
     $I->wantTo('To view administration overview page');
     $admin = $I->createUser(1, 4);
     $project1 = $I->createProject(1);
     $project2 = $I->createProject(2);
     $project2->status = Tinyissue\Model\Project::STATUS_ARCHIVED;
     $project2->save();
     $I->createProject(3);
     $I->createIssue(1, $admin, null, $project1);
     $I->createIssue(2, $admin, null, $project1);
     $issue3 = $I->createIssue(3, $admin, null, $project1);
     $issue3->changeStatus(Project\Issue::STATUS_CLOSED, $admin);
     $I->amLoggedAs($admin);
     $I->amOnAction('HomeController@getIndex');
     $I->click(trans('tinyissue.administration'));
     $I->seeCurrentActionIs('AdministrationController@getIndex');
     $I->see('1', '//li[@class="list-group-item" and text()[contains(.,\'' . trans('tinyissue.total_users') . '\')]]/span');
     $I->see('2', '//li[@class="list-group-item" and text()[contains(.,\'' . trans('tinyissue.active_projects') . '\')]]/span');
     $I->see('1', '//li[@class="list-group-item" and text()[contains(.,\'' . trans('tinyissue.archived_projects') . '\')]]/span');
     $I->see('2', '//li[@class="list-group-item" and text()[contains(.,\'' . trans('tinyissue.open_issues') . '\')]]/span');
     $I->see('1', '//li[@class="list-group-item" and text()[contains(.,\'' . trans('tinyissue.closed_issues') . '\')]]/span');
 }
開發者ID:oliverpool,項目名稱:tinyissue,代碼行數:31,代碼來源:AdministrationCest.php

示例10: openPageByRoute

 public function openPageByRoute(FunctionalTester $I)
 {
     $I->amOnRoute('posts.index');
     $I->seeCurrentUrlEquals('/posts');
     $I->seeCurrentActionIs('PostsController@index');
 }
開發者ID:resulaslan,項目名稱:sample-l4-app,代碼行數:6,代碼來源:RoutesCest.php

示例11: FunctionalTester

<?php

$I = new FunctionalTester($scenario);
$I->amOnPage('/logout');
//setup
$I->am('a user');
$I->wantTo('login into my account');
$I->haveInDatabase('users', ['email' => 'john.doe@mail.com', 'password' => bcrypt('password'), 'created_at' => '2015-03-29 19:48:28', 'updated_at' => '2015-03-29 19:48:28']);
//action
$I->amOnPage('/login');
$I->see('Connexion');
$I->fillField(['name' => 'email'], 'john.doe@mail.com');
$I->fillField(['name' => 'password'], 'password');
$I->click('submit-login');
//verify
$I->seeCurrentActionIs('DashboardController@index');
$I->canSeeAuthentication();
開發者ID:iris-it,項目名稱:irispass-webapp-laravel,代碼行數:17,代碼來源:LoginCept.php

示例12: updateIssue

 /**
  * @param FunctionalTester $I
  *
  * @actor FunctionalTester
  *
  * @return void
  */
 public function updateIssue(FunctionalTester $I)
 {
     $I->am('Developer User');
     $I->expectTo('edit an existing project issue details');
     $user = $I->createUser(1, 2);
     $admin = $I->createUser(2, 4);
     $project = $I->createProject(1, [$user]);
     $issue = $I->createIssue(1, $admin, null, $project);
     $I->amLoggedAs($user);
     $I->amOnAction('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
     $I->click($issue->title, '.edit-issue');
     $I->seeCurrentActionIs('Project\\IssueController@getEdit', ['project' => $project, 'issue' => $issue]);
     $newTitle = $issue->title . ' update';
     $I->fillField('title', $newTitle);
     $I->click(trans('tinyissue.update_issue'));
     $I->seeResponseCodeIs(200);
     $I->seeCurrentActionIs('Project\\IssueController@getIndex', ['project' => $project, 'issue' => $issue]);
     $I->seeLink($newTitle);
 }
開發者ID:oliverpool,項目名稱:tinyissue,代碼行數:26,代碼來源:PermissionDeveloperCest.php


注:本文中的FunctionalTester::seeCurrentActionIs方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。