当前位置: 首页>>代码示例>>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;未经允许,请勿转载。