<?php include dirname(__FILE__) . '/../bootstrap/Doctrine.php'; include dirname(__FILE__) . '/../../lib/test/chartSourceUtilityTest.class.php'; $ut = new chartSourceUtilityTest(new sfBrowser()); $t = new lime_test(136, new lime_output_color()); $scenarios = $ut->getBaseScenarios(); $options = array('categories' => getCategories(), 'vehicles' => getVehicles($ut->getUserId('user_gs')), 'user_id' => $ut->getUserId('user_gs')); $params = array('full_history' => false); //foreach ($scenarios as $key => $scenario) { for ($index = 0; $index < 16; $index++) { $scenario = $scenarios[$index]; $y = getYForScenario($ut, $scenario); $x = getXForScenario($ut, $scenario); $fname = 'buildCostPieChartData'; $options = array_merge($options, array('vehicle_display' => $scenario[0])); $g = $ut->runTest($t, $scenario, $fname, $x, $y, $options, $params); } function getYForScenario($ut, $scenario) { $case = $ut->getCase($scenario[0], $scenario[1]); $range = $scenario[2]; $limit = isset($scenario[3]) ? true : false; // categories // [0] => Fuel // [1] => Initial investment // [2] => Leasing // [3] => Tax // [4] => Accessory // [5] => Insurance // [6] => Fine