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


PHP aRequest函数代码示例

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


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

示例1: itDoesNotDisableIfItIsNotAlreadyTheCase

 public function itDoesNotDisableIfItIsNotAlreadyTheCase()
 {
     $request = aRequest()->with('cardwall_on_top', '0')->build();
     stub($this->dao)->isEnabled($this->tracker_id)->returns(false);
     stub($this->dao)->disable()->never();
     $this->command->execute($request);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:EnableCardwallOnTopTest.php

示例2: aOneStepProjectCreationForm

 protected function aOneStepProjectCreationForm($request_data)
 {
     $project_manager = mock('ProjectManager');
     $request = aRequest()->withParams($request_data)->build();
     $creation_request = new Project_OneStepCreation_OneStepCreationRequest($request, $project_manager);
     return new Project_OneStepCreation_OneStepCreationPresenter($creation_request, array(), $project_manager, array());
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:OneStepProjectCreationPresenterTest.php

示例3: itDoesNotDisableIfItIsNotAlreadyTheCase

 public function itDoesNotDisableIfItIsNotAlreadyTheCase()
 {
     $request = aRequest()->with('use_freestyle_columns', '0')->build();
     stub($this->dao)->isFreestyleEnabled($this->tracker_id)->returns(false);
     stub($this->dao)->disableFreestyleColumns()->never();
     $this->command->execute($request);
 }
开发者ID:nterray,项目名称:tuleap,代码行数:7,代码来源:EnableFreestyleColumnsTest.php

示例4: aCreationValidator

    protected function aCreationValidator($request_data, $required_custom_descriptions) {
        $request = aRequest()->withParams($request_data)->build();
        $creation_request = new Project_OneStepCreation_OneStepCreationRequest($request, ProjectManager::instance());
        $validator = new Project_OneStepCreation_OneStepCreationValidator($creation_request, $required_custom_descriptions);

        return $validator;
    }
开发者ID:rinodung,项目名称:tuleap,代码行数:7,代码来源:OneStepProjectCreationValidatorTest.php

示例5: itUpdatesAllColumns

 public function itUpdatesAllColumns()
 {
     $request = aRequest()->with('column', array(12 => array('label' => 'Todo', 'bgcolor' => '#000000'), 13 => array('label' => ''), 14 => array('label' => 'Done', 'bgcolor' => '#16ed9d')))->build();
     stub($this->dao)->save($this->tracker_id, 12, 'Todo', 0, 0, 0)->at(0);
     stub($this->dao)->save($this->tracker_id, 14, 'Done', 22, 237, 157)->at(1);
     stub($this->dao)->save()->count(2);
     $this->command->execute($request);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:UpdateColumnsTest.php

示例6: itRevokesPermissions

 public function itRevokesPermissions()
 {
     $request = aRequest()->with(Tracker_Permission_Command::PERMISSION_PREFIX . ProjectUGroup::ANONYMOUS, Tracker_Permission_Command::PERMISSION_SUBMITTER_ONLY)->with(Tracker_Permission_Command::PERMISSION_PREFIX . ProjectUGroup::REGISTERED, Tracker_Permission_Command::PERMISSION_FULL)->build();
     $set_permission_request = new Tracker_Permission_PermissionRequest(array());
     $set_permission_request->setFromRequest($request, $this->minimal_ugroup_list);
     $set_permission_request->revoke(ProjectUGroup::REGISTERED);
     $this->assertNull($set_permission_request->getPermissionType(ProjectUGroup::REGISTERED));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:8,代码来源:PermissionRequestTest.php

示例7: itDeletesOnlyCustomMappings

 public function itDeletesOnlyCustomMappings()
 {
     $request = aRequest()->with('custom_mapping', array('13' => '1', '42' => 0, '69' => 0))->build();
     stub($this->dao)->delete($this->tracker_id, 69)->at(0)->returns(true);
     stub($this->dao)->delete()->count(1);
     stub($this->value_dao)->delete($this->tracker_id, 69)->at(0);
     stub($this->value_dao)->delete()->count(1);
     $this->command->execute($request);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:9,代码来源:DeleteMappingFieldsTest.php

示例8: setUp

 public function setUp()
 {
     parent::setUp();
     $this->planning_id = '321';
     $this->user = aUser()->withId(12)->build();
     $this->request = aRequest()->with('planning_id', $this->planning_id)->withUser($this->user)->build();
     $this->milestone_factory = mock('Planning_MilestoneFactory');
     $this->current_milestone_artifact_id = 444;
     $milestone = aMilestone()->withArtifact(anArtifact()->withId($this->current_milestone_artifact_id)->build())->build();
     stub($this->milestone_factory)->getCurrentMilestone($this->user, $this->planning_id)->returns($milestone);
 }
开发者ID:nterray,项目名称:tuleap,代码行数:11,代码来源:MilestoneSelectorControllerTest.php

示例9: setUp

 public function setUp()
 {
     parent::setUp();
     $planning_id = "99876387";
     $aid = -1;
     $this->planning_tracker_id = 66;
     $this->request = aRequest()->withUri("/plugins/agiledashboard/?group_id=104&action=show&planning_id={$planning_id}&aid={$aid}")->build();
     $this->planning = aPlanning()->withId($planning_id)->withPlanningTrackerId($this->planning_tracker_id)->build();
     $planning_factory = mock('PlanningFactory');
     stub($planning_factory)->getPlanning($planning_id)->returns($this->planning);
     $this->controller = new Planning_ArtifactCreationController($planning_factory, $this->request);
 }
开发者ID:nterray,项目名称:tuleap,代码行数:12,代码来源:ArtifactCreationControllerTest.php

示例10: itDeletesAllColumns

 public function itDeletesAllColumns()
 {
     $request = aRequest()->with('column', array(12 => array('label' => ''), 13 => array('label' => '')))->build();
     stub($this->field_dao)->deleteCardwall($this->tracker_id)->once();
     stub($this->value_dao)->deleteForColumn($this->tracker_id, 12)->at(0);
     stub($this->value_dao)->deleteForColumn($this->tracker_id, 13)->at(1);
     stub($this->value_dao)->deleteForColumn()->count(2);
     stub($this->dao)->delete($this->tracker_id, 12)->at(0);
     stub($this->dao)->delete($this->tracker_id, 13)->at(1);
     stub($this->dao)->delete()->count(2);
     $this->command->execute($request);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:12,代码来源:DeleteColumnsTest.php

示例11: setUp

 public function setUp()
 {
     parent::setUp();
     ForgeConfig::store();
     ForgeConfig::set('codendi_dir', AGILEDASHBOARD_BASE_DIR . '/../../..');
     $this->planning_id = '321';
     $this->user = aUser()->withId(12)->build();
     $this->request = aRequest()->with('planning_id', $this->planning_id)->withUser($this->user)->build();
     $this->milestone_factory = mock('Planning_MilestoneFactory');
     $this->current_milestone_artifact_id = 444;
     $milestone = aMilestone()->withArtifact(anArtifact()->withId($this->current_milestone_artifact_id)->build())->build();
     stub($this->milestone_factory)->getLastMilestoneCreated($this->user, $this->planning_id)->returns($milestone);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:13,代码来源:MilestoneSelectorControllerTest.php

示例12: setUp

 function setUp()
 {
     parent::setUp();
     $this->tracker_id = 3;
     $project = stub('Project')->getId()->returns(101);
     $this->tracker = aTracker()->withId($this->tracker_id)->withName('Stories')->withProject($project)->build();
     $this->hierarchical_tracker = new Tracker_Hierarchy_HierarchicalTracker($this->tracker, array());
     $this->request = aRequest()->withUser(mock('PFUser'))->build();
     $this->tracker_factory = new MockTrackerFactory();
     $this->dao = new MockTracker_Hierarchy_Dao();
     $this->factory = new MockTracker_Hierarchy_HierarchicalTrackerFactory($this->tracker_factory, $this->dao);
     $this->redirect_url = TRACKER_BASE_URL . "/?tracker={$this->tracker_id}&func=admin-hierarchy";
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:13,代码来源:ControllerTest.php

示例13: itDoesNotUpdateThePostActionIfJobURLIsNotChanged

 public function itDoesNotUpdateThePostActionIfJobURLIsNotChanged()
 {
     $transition = mock('Transition');
     $id = 123;
     $job_url = 'http://www.example.com';
     $client = mock('Jenkins_Client');
     $condendi_request = aRequest()->with('remove_postaction', array())->with('workflow_postaction_ci_build', array($id => $job_url))->build();
     $ci_build_dao = mock('Transition_PostAction_CIBuildDao');
     $post_action_ci_build = partial_mock('Transition_PostAction_CIBuild', array('getDao'), array($transition, $id, $job_url, $client));
     stub($post_action_ci_build)->getDao()->returns($ci_build_dao);
     expect($ci_build_dao)->updatePostAction()->never();
     expect($GLOBALS['Response'])->addFeedback('error', '*')->never();
     $post_action_ci_build->process($condendi_request);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:14,代码来源:Transition_PostAction_CIBuildTest.php

示例14: setUp

 public function setUp()
 {
     parent::setUp();
     $this->sprint_planning = aPlanning()->withBacklogTracker(aTracker()->build())->build();
     $this->sprint_1 = mock('Planning_Milestone');
     stub($this->sprint_1)->hasAncestors()->returns(true);
     $this->sprint_2 = aMilestone()->withArtifact(aMockArtifact()->withId(1234)->build())->build();
     $this->milestone_factory = mock('Planning_MilestoneFactory');
     $this->current_user = aUser()->build();
     $this->request = aRequest()->withUser($this->current_user)->build();
     $this->pane_presenter_builder_factory = mock('AgileDashboard_Milestone_Pane_PanePresenterBuilderFactory');
     stub($this->pane_presenter_builder_factory)->getContentPresenterBuilder()->returns(mock('AgileDashboard_Milestone_Pane_Content_ContentPresenterBuilder'));
     stub($this->pane_presenter_builder_factory)->getPlanningPresenterBuilder()->returns(mock('AgileDashboard_Milestone_Pane_Planning_PlanningPresenterBuilder'));
 }
开发者ID:rinodung,项目名称:tuleap,代码行数:14,代码来源:MilestonePaneFactoryTest.php

示例15: setUp

 public function setUp()
 {
     parent::setUp();
     ForgeConfig::store();
     ForgeConfig::set('codendi_dir', AGILEDASHBOARD_BASE_DIR . '/../../..');
     $this->plugin_path = '/plugin/path';
     $this->product = aMilestone()->withArtifact(aMockArtifact()->withId(1)->withTitle('Product X')->build())->build();
     $this->release = aMilestone()->withArtifact(aMockArtifact()->withId(2)->withTitle('Release 1.0')->build())->build();
     $this->sprint = aMilestone()->withArtifact(aMockArtifact()->withId(3)->withTitle('Sprint 1')->build())->build();
     $this->nomilestone = stub('Planning_NoMilestone')->getPlanning()->returns(mock('Planning'));
     $this->milestone_factory = mock('Planning_MilestoneFactory');
     $this->project_manager = mock('ProjectManager');
     $this->current_user = aUser()->build();
     $this->request = aRequest()->withUser($this->current_user)->with('group_id', 102)->build();
     $this->project = mock('Project');
     stub($this->project_manager)->getProject(102)->returns($this->project);
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:17,代码来源:MilestoneControllerTest.php


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