本文整理匯總了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));
}