public function testVarExport() { ob_start(); $t = new \Test\Vars(); $this->assertTrue($t->testVarExport() == "'hello'"); ob_clean(); }
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'"); }