function display_flow_bar($name, $delay, $size = 200) { $chunk = $size / 5; echo "<div id='{$name}_flow_bar'><table class='list view' cellpading=0 cellspacing=0><tr><td id='{$name}_flow_bar0' width='{$chunk}px' bgcolor='#cccccc' align='center'> </td><td id='{$name}_flow_bar1' width='{$chunk}px' bgcolor='#ffffff' align='center'> </td><td id='{$name}_flow_bar2' width='{$chunk}px' bgcolor='#ffffff' align='center'> </td><td id='{$name}_flow_bar3' width='{$chunk}px' bgcolor='#ffffff' align='center'> </td><td id='{$name}_flow_bar4' width='{$chunk}px' bgcolor='#ffffff' align='center'> </td></tr></table></div><br>"; echo str_repeat(' ', 256); progress_bar_flush(); start_flow_bar($name, $delay); }
public function teststart_flow_bar() { //execute the method and test if it doesn't throw an exception. //this method uses flush so we cannot get and verify content printed try { ob_start(); start_flow_bar('test', 1, false); ob_end_clean(); $this->assertTrue(true); } catch (Exception $e) { $this->fail(); } }