本文整理汇总了PHP中Planning::setBacklogTracker方法的典型用法代码示例。如果您正苦于以下问题:PHP Planning::setBacklogTracker方法的具体用法?PHP Planning::setBacklogTracker怎么用?PHP Planning::setBacklogTracker使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Planning
的用法示例。
在下文中一共展示了Planning::setBacklogTracker方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
if ($this->backlog_tracker) {
$planning->setBacklogTracker($this->backlog_tracker);
}
return $planning;
}
示例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'], $backlog_tracker->getId(), $planning['planning_tracker_id']);
$p->setBacklogTracker($backlog_tracker);
$p->setPlanningTracker($this->getPlanningTracker($p));
$plannings[] = $p;
}
return $plannings;
}
示例3: 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));
}