Skip to content

Commit

Permalink
Fix AppVeyor builds
Browse files Browse the repository at this point in the history
The class imports were incorrect, and tests were failing on AppVeyor.
  • Loading branch information
markstory committed Aug 31, 2014
1 parent 919b740 commit 21b7029
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/TestCase/Network/Http/Adapter/StreamTest.php
Expand Up @@ -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;
Expand Down Expand Up @@ -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]);
Expand Down
14 changes: 7 additions & 7 deletions tests/TestCase/Network/SocketTest.php
Expand Up @@ -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;

Expand Down Expand Up @@ -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.');
}
}
Expand Down Expand Up @@ -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.');
}
}
Expand All @@ -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.');
}
}
Expand All @@ -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.');
}
}
Expand All @@ -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.');
}
}
Expand Down Expand Up @@ -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.');
}
}
Expand Down

0 comments on commit 21b7029

Please sign in to comment.