} test('New PHPlot object', $p, $dcol, $bcol, $ecol); $p->SetDataColors('red'); $p->SetDataBorderColors('blue'); $p->SetErrorBarColors('green'); test('Then set color arrays to single word', $p, 1, 1, 1); $p = new PHPlot_pv(); $p->SetDataColors($c6); $p->SetDataBorderColors($c6); $p->SetErrorBarColors($c6); test('New object, set color arrays to array of 6', $p, 6, 6, 6); $p->SetDataColors(); $p->SetDataBorderColors(); $p->SetErrorBarColors(); test('Then use NULL, should be ignored', $p, 6, 6, 6); $p->SetDataColors(''); $p->SetDataBorderColors(''); $p->SetErrorBarColors(''); test('Then set color arrays to default, using empty string', $p, $dcol, $bcol, $ecol); $p = new PHPlot_pv(); $p->SetDataColors($c6); $p->SetDataColors(False); $p->SetDataBorderColors(False); $p->SetErrorBarColors(False); test('New object, using False also sets color arrays to default', $p, $dcol, $bcol, $ecol); # ======== End of test cases and error reporting ========== echo "setcolors results: {$n_tests} test cases, {$n_pass} pass, {$n_fail} fail\n"; if ($n_fail > 0) { exit(1); } # PHPlot test suite requires falling off the end, not exit, on success.