Пример #1
0
 /**
  * Test var_dump function (array and string).
  */
 public function testVarDumpArrayAndString()
 {
     $this->setOutputCallback(function ($output) {
         /* To prevent differences between PHP version */
         return str_replace(array("\n", ' '), '', $output);
     });
     $this->expectOutputString('array(3){' . '[0]=>int(1)' . '[1]=>string(5)"world"' . '[2]=>bool(false)}' . 'string(5)"hello"');
     $t = new \Test\Vars();
     $t->testVarDump();
 }
Пример #2
0
 public function testVarDump()
 {
     ob_start();
     $t = new \Test\Vars();
     $t->testVarDump();
     $t->testVarDump2param(3.1, true);
     $t->testVarDump3param(3.1, true, array(1, 2, 3));
     $t->testVarDump2param(3.1, true);
     ob_clean();
 }