本文整理汇总了PHP中TrackerFactory::setCachedInstances方法的典型用法代码示例。如果您正苦于以下问题:PHP TrackerFactory::setCachedInstances方法的具体用法?PHP TrackerFactory::setCachedInstances怎么用?PHP TrackerFactory::setCachedInstances使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TrackerFactory
的用法示例。
在下文中一共展示了TrackerFactory::setCachedInstances方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setUpTrackers
private function setUpTrackers(TrackerFactory $tracker_factory, Tracker_Hierarchy_Dao $hierarchy_dao)
{
$this->epic_tracker = aMockTracker()->withId(104)->build();
$this->story_tracker = aMockTracker()->withId(103)->build();
$this->release_tracker = aMockTracker()->withId(107)->build();
$this->sprint_tracker = aMockTracker()->withId(108)->build();
$tracker_factory->setCachedInstances(array(104 => $this->epic_tracker, 103 => $this->story_tracker, 107 => $this->release_tracker, 108 => $this->sprint_tracker));
stub($hierarchy_dao)->searchTrackerHierarchy(array(103, 104))->returnsDar(array('parent_id' => '104', 'child_id' => '103'));
stub($hierarchy_dao)->searchTrackerHierarchy(array(108, 107))->returnsDar(array('parent_id' => '107', 'child_id' => '108'));
stub($hierarchy_dao)->searchTrackerHierarchy()->returnsEmptyDar();
}