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


PHP Planning::setPlanningTracker方法代码示例

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


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

示例1: build

 public function build()
 {
     $planning = new Planning($this->id, $this->name, $this->group_id, $this->backlog_title, $this->plan_title, $this->backlog_tracker_id, $this->planning_tracker_id);
     if ($this->planning_tracker) {
         $planning->setPlanningTracker($this->planning_tracker);
     }
     return $planning;
 }
开发者ID:nickl-,项目名称:tuleap,代码行数:8,代码来源:aPlanning.php

示例2: getPlanningsByBacklogTracker

 /**
  * Returns all the Planning that use given tracker as backlog tracker
  *
  * Given:
  *   Epic  -> Product
  *   Epic  -> Release
  *   Story -> Sprint
  * When getPlanningsByBacklogTracker(Epic) -> [Product, Release]
  * When getPlanningsByBacklogTracker(Story) -> [Sprint]
  *
  * @param Tracker $backlog_tracker
  *
  * @return Planning
  */
 public function getPlanningsByBacklogTracker(Tracker $backlog_tracker)
 {
     $plannings = array();
     foreach ($this->dao->searchByBacklogTrackerId($backlog_tracker->getId()) as $planning) {
         $p = new Planning($planning['id'], $planning['name'], $planning['group_id'], $planning['backlog_title'], $planning['plan_title'], array($backlog_tracker->getId()), $planning['planning_tracker_id']);
         $p->setBacklogTrackers(array($backlog_tracker));
         $p->setPlanningTracker($this->getPlanningTracker($p));
         $plannings[] = $p;
     }
     return $plannings;
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:25,代码来源:PlanningFactory.class.php

示例3: itReturnsAPlanning

 public function itReturnsAPlanning()
 {
     $planning = new Planning(1, 'Release Planning', 102, 'Release Backlog', 'Sprint Plan', array());
     $planning->setPlanningTracker($this->planning_tracker);
     $planning->setBacklogTrackers(array($this->backlog_tracker));
     $this->assertEqual($planning, $this->factory->getPlanningByPlanningTracker($this->tracker));
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:7,代码来源:PlanningFactoryTest.php

示例4: itReturnsAPlanning

 public function itReturnsAPlanning()
 {
     $tracker = aMockTracker()->withId(99)->build();
     $dar = TestHelper::arrayToDar(array('id' => 1, 'name' => 'Release Planning', 'group_id' => 102, 'planning_tracker_id' => 103, 'backlog_title' => 'Release Backlog', 'plan_title' => 'Sprint Plan', 'backlog_tracker_id' => 104));
     $dao = stub('PlanningDao')->searchByPlanningTrackerId()->returns($dar);
     $planning_tracker = mock('Tracker');
     $backlog_tracker = mock('Tracker');
     $tracker_factory = mock('TrackerFactory');
     stub($tracker_factory)->getTrackerById(103)->returns($planning_tracker);
     stub($tracker_factory)->getTrackerById('*')->returns($backlog_tracker);
     $factory = aPlanningFactory()->withDao($dao)->withTrackerFactory($tracker_factory)->build();
     $planning = new Planning(1, 'Release Planning', 102, 'Release Backlog', 'Sprint Plan', 104, 103);
     $planning->setPlanningTracker($planning_tracker);
     $planning->setBacklogTracker($backlog_tracker);
     $this->assertEqual($planning, $factory->getPlanningByPlanningTracker($tracker));
 }
开发者ID:nterray,项目名称:tuleap,代码行数:16,代码来源:PlanningFactoryTest.php


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