old_is_cli = \Fuel::$is_cli; \Fuel::$is_cli = false; } public function tearDown() { // Restore original value \Fuel::$is_cli = $this->old_is_cli; } public function test_debug_dump_normally() { $expected = '

COREPATH/tests/debug.php @ line: 41

Variable #1:'."\n".'  (Integer): 1'."\n\n\n".'Variable #2:'."\n".'  (Integer): 2'."\n\n\n".'Variable #3:'."\n".'  (Integer): 3'."\n\n\n".'
'; ob_start(); \Debug::dump(1, 2, 3); $output = ob_get_contents(); ob_end_clean(); $this->assertEquals($expected, $output); } public function test_debug_dump_by_call_user_func_array() { $expected = '

COREPATH/tests/debug.php @ line: 53

Variable #1:'."\n".'  (Integer): 1'."\n\n\n".'Variable #2:'."\n".'  (Integer): 2'."\n\n\n".'Variable #3:'."\n".'  (Integer): 3'."\n\n\n".'
'; ob_start(); call_user_func_array('\\Debug::dump', array(1, 2, 3)); $output = ob_get_contents(); ob_end_clean(); $this->assertEquals($expected, $output); } public function test_debug_dump_by_call_fuel_func_array() { $expected = '

COREPATH/base.php @ line: %d

Variable #1:
  (Integer): 1


Variable #2:
  (Integer): 2


Variable #3:
  (Integer): 3


'; if (PHP_VERSION_ID >= 50600) { $expected = str_replace('base.php', 'base56.php', $expected); } ob_start(); call_fuel_func_array('\\Debug::dump', array(1, 2, 3)); $output = ob_get_contents(); ob_end_clean(); $this->assertStringMatchesFormat($expected, $output); } }