stdout() 공개 메소드

Writes the message $msg to STDOUT.
public stdout ( string $msg, string $status = self::STATUS_OK ) : Phrozn\Outputter
$msg string The message to output
$status string Ignored
리턴 Phrozn\Outputter
예제 #1
0
 public function testStdOutWithResource()
 {
     $fp = fopen('/tmp/stdout', 'w+');
     define('STDOUT', $fp);
     fclose($fp);
     $outputter = new Outputter();
     $outputter->stdout('sending output', '');
     $this->assertSame('sending output', trim(file_get_contents('/tmp/stdout')));
 }
예제 #2
0
 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));
 }