Ejemplo n.º 1
0
 public function testVarExport()
 {
     ob_start();
     $t = new \Test\Vars();
     $this->assertTrue($t->testVarExport() == "'hello'");
     ob_clean();
 }
Ejemplo n.º 2
0
 public function testVarExport()
 {
     $this->setOutputCallback(function ($output) {
         return str_replace(array("\n", ' '), '', $output);
     });
     $this->expectOutputString("array(0=>1,1=>'world',2=>false,)'hello'");
     $t = new \Test\Vars();
     $this->assertSame($t->testVarExport(), "'hello'");
 }