Extends
lithium\test\UnitSource
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->assertTrue(is_resource($response->error));
$this->assertEqual(2, $response->error('ok'));
$this->assertEqual('ok', file_get_contents($this->streams['error']));
}