PhroznTest\Outputter\PlainOutputterTest::testStdOutWithResource PHP Method

testStdOutWithResource() public method

    public function testStdOutWithResource()
    {
        $fp = tmpfile();
        define('STDOUT', $fp);
        $outputter = new Outputter();
        $outputter->stdout('sending output', '');
        rewind($fp);
        $contents = fread($fp, 8096);
        fclose($fp);
        $this->assertSame('sending output', trim($contents));
    }