public function testGetContents() { $instance = new OutputBuffer(); $instance->begin(); echo 'Hide this from Chuck Norris'; $instance->end(false); $expected = 'Hide this from Chuck Norris'; $actual = $instance->getContents(); $this->assertEquals($expected, $actual); }