public function itOnlyAddTitlesWhithEmptyData()
 {
     $input_datas = array(array('group_id' => 87, 'result' => 'descr2'));
     $expected = array(1 => array("title" => 'res1', "descr" => 0), 87 => array("title" => 'res2', "descr" => 'descr2'), 104 => array("title" => 'res3', "descr" => 0));
     $this->usage_formatter->buildDatas($this->first_input_datas, "title");
     $datas = $this->usage_formatter->buildDatas($input_datas, "descr");
     $this->assertEqual($datas, $expected);
 }
Exemplo n.º 2
0
function exportDiskUsageForDate(Statistics_Services_UsageFormatter $csv_exporter, $date, $column_name)
{
    $disk_usage_manager = new Statistics_DiskUsageManager();
    $disk_usage = $disk_usage_manager->returnTotalSizeOfProjects($date);
    $disk_usage = $csv_exporter->formatSizeInMegaBytes($disk_usage);
    $csv_exporter->buildDatas($disk_usage, $column_name);
}