Skip to content
Permalink
Browse files

Skip test when localhost doesn't respond (like on appveyor).

  • Loading branch information...
markstory committed Jul 26, 2014
1 parent 5daf002 commit 01a910dd447bd320596a82e78c7af09bc4492c15
Showing with 6 additions and 1 deletion.
  1. +6 −1 tests/TestCase/Network/Http/Adapter/StreamTest.php
@@ -13,6 +13,7 @@
*/
namespace Cake\Test\TestCase\Network\Http\Adapter;
use Cake\Error;
use Cake\Network\Http\Adapter\Stream;
use Cake\Network\Http\Request;
use Cake\Network\Http\Response;
@@ -43,7 +44,11 @@ public function testSend() {
->header('User-Agent', 'CakePHP TestSuite')
->cookie('testing', 'value');
$responses = $stream->send($request, []);
try {
$responses = $stream->send($request, []);
} catch (Error\Exception $e) {
$this->markTestSkipped('Could not connect to localhost, skipping');
}
$this->assertInstanceOf('Cake\Network\Http\Response', $responses[0]);
}

0 comments on commit 01a910d

Please sign in to comment.
You can’t perform that action at this time.