Phrozn\Outputter\TestOutputter::stdout PHP Method

stdout() public method

Add line to output
public stdout ( $msg, string $status = self::STATUS_OK ) : Phrozn\Outputter
$status string Output status
return Phrozn\Outputter
    public function stdout($msg, $status = self::STATUS_OK)
    {
        if (defined('STDOUT')) {
            fwrite(STDOUT, $msg);
        } else {
            $msg = Color::strip(Color::convert($msg));
            $this->lines[] = trim($msg);
        }
        return $this;
    }

Usage Example

示例#1
0
 public function testAssertNotInLogsFail()
 {
     $this->setExpectedException('PHPUnit_Framework_AssertionFailedError', 'this should produce error');
     $outputter = new Outputter($this);
     $outputter->stdout('this string exists');
     $outputter->assertNotInLogs('this string exists', 'this should produce error');
 }