lithium\console\Response::error PHP Method

error() public method

Writes string to error stream
public error ( string $error ) : mixed
$error string
return mixed
    public function error($error)
    {
        return fwrite($this->error, String::insert($error, $this->styles()));
    }

Usage Example

Esempio n. 1
0
 public function testError()
 {
     $base = Libraries::get(true, 'resources') . '/tmp/tests';
     $this->skipIf(!is_writable($base), "Path `{$base}` is not writable.");
     $response = new Response(array('error' => fopen($this->streams['error'], 'w+')));
     $this->assertInternalType('resource', $response->error);
     $this->assertEqual(2, $response->error('ok'));
     $this->assertEqual('ok', file_get_contents($this->streams['error']));
 }
All Usage Examples Of lithium\console\Response::error