/** * @param Sprint $sprint * * @return StoryPointBurndown */ public function getStoryPointBurndown(Sprint $sprint) { $doneSP = $this->storyPointManager->getDoneStoryPoints($this->todoLists, $this->wipLists, $this->doneLists, $sprint); $total = $this->storyPointManager->getTotalSprintStoryPoints($this->todoLists, $this->wipLists, $this->doneLists, $sprint); $average = $this->storyPointManager->getAverageStoryPointsPerDay($total, $sprint); $burndown = new StoryPointBurndown($sprint, $total, $doneSP, $average); return $burndown; }
/** * test average story point per worked days. */ public function testGetAverageStoryPointsPerDay() { $trelloClient = $this->getTrelloClientMock(); $actionManager = new ActionManager($trelloClient); $storyPointManager = new StoryPointManager($trelloClient, $actionManager); $todoLists = [$this->getListMock('1')]; $wipLists = [$this->getListMock('2')]; $doneLists = [$this->getListMock('3')]; $sprint = $this->getSprintMock(); $total = $storyPointManager->getTotalSprintStoryPoints($todoLists, $wipLists, $doneLists, $sprint); $this->assertEquals(5.4, $storyPointManager->getAverageStoryPointsPerDay($total, $sprint)); }