Skip to content
Permalink
Browse files

Fix AppVeyor builds

The class imports were incorrect, and tests were failing on AppVeyor.
  • Loading branch information...
markstory committed Aug 31, 2014
1 parent 919b740 commit 21b7029d8c63dff2cbf8eabd9bbdb05db4833f82
Showing with 9 additions and 9 deletions.
  1. +2 −2 tests/TestCase/Network/Http/Adapter/StreamTest.php
  2. +7 −7 tests/TestCase/Network/SocketTest.php
@@ -13,7 +13,7 @@
*/
namespace Cake\Test\TestCase\Network\Http\Adapter;
use Cake\Error;
use Cake\Network\Exception\SocketException;
use Cake\Network\Http\Adapter\Stream;
use Cake\Network\Http\Request;
use Cake\Network\Http\Response;
@@ -46,7 +46,7 @@ public function testSend() {
try {
$responses = $stream->send($request, []);
} catch (Error\Exception $e) {
} catch (SocketException $e) {
$this->markTestSkipped('Could not connect to localhost, skipping');
}
$this->assertInstanceOf('Cake\Network\Http\Response', $responses[0]);
@@ -14,7 +14,7 @@
*/
namespace Cake\Test\TestCase\Network;
use Cake\Network\Error\SocketException;
use Cake\Network\Exception\SocketException;
use Cake\Network\Socket;
use Cake\TestSuite\TestCase;
@@ -95,7 +95,7 @@ public function testSocketConnection() {
$this->Socket = new Socket($config);
$this->Socket->connect();
$this->assertTrue($this->Socket->connected);
} catch (Cake\Network\Exception\SocketException $e) {
} catch (SocketException $e) {
$this->markTestSkipped('Cannot test network, skipping.');
}
}
@@ -144,7 +144,7 @@ public function testSocketHost() {
$this->assertEquals(gethostbyaddr('127.0.0.1'), $this->Socket->host());
$this->assertEquals(null, $this->Socket->lastError());
$this->assertTrue(in_array('127.0.0.1', $this->Socket->addresses()));
} catch (Cake\Network\Exception\SocketException $e) {
} catch (SocketException $e) {
$this->markTestSkipped('Cannot test network, skipping.');
}
}
@@ -158,7 +158,7 @@ public function testSocketWriting() {
try {
$request = "GET / HTTP/1.1\r\nConnection: close\r\n\r\n";
$this->assertTrue((bool)$this->Socket->write($request));
} catch (Cake\Network\Exception\SocketException $e) {
} catch (SocketException $e) {
$this->markTestSkipped('Cannot test network, skipping.');
}
}
@@ -179,7 +179,7 @@ public function testSocketReading() {
$this->assertTrue($this->Socket->connect());
$this->assertEquals(null, $this->Socket->read(26));
$this->assertEquals('2: ' . 'Connection timed out', $this->Socket->lastError());
} catch (Cake\Network\Exception\SocketException $e) {
} catch (SocketException $e) {
$this->markTestSkipped('Cannot test network, skipping.');
}
}
@@ -199,7 +199,7 @@ public function testTimeOutConnection() {
$this->Socket = new Socket($config);
$this->assertFalse($this->Socket->read(1024 * 1024));
$this->assertEquals('2: ' . 'Connection timed out', $this->Socket->lastError());
} catch (Cake\Network\Exception\SocketException $e) {
} catch (SocketException $e) {
$this->markTestSkipped('Cannot test network, skipping.');
}
}
@@ -287,7 +287,7 @@ protected function _connectSocketToSslTls() {
$this->Socket = new Socket($configSslTls);
try {
$this->Socket->connect();
} catch (Cake\Network\Exception\SocketException $e) {
} catch (SocketException $e) {
$this->markTestSkipped('Cannot test network, skipping.');
}
}

0 comments on commit 21b7029

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