Пример #1
0
    public function testObject()
    {
        // Reset the output file.
        file_put_contents('debug.txt', '');
        // Perform the dump.
        Dump::dump(new \stdClass());
        $line = __LINE__;
        --$line;
        $file = __FILE__;
        $datetime = new \Datetime();
        $time = $datetime->format('r');
        $expectation = <<<FILEOUTPUT

{$time}
{$file} dump:{$line}
--------------------------------------------------------------------------------
object(stdClass)#20 (0) {
}
--------------------------------------------------------------------------------

FILEOUTPUT;
        $this->assertEquals($expectation, file_get_contents('debug.txt'));
    }
Пример #2
0
 /**
  * Var dump like a boss with functional programming.
  */
 function dumpdump($var, $id = null)
 {
     Dump::setBacktrace(debug_backtrace());
     Dump::dump($var, $id);
 }