Skip to content

Commit

Permalink
Fixed remaining failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Aug 30, 2014
1 parent add0bd5 commit 240f586
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
16 changes: 8 additions & 8 deletions tests/TestCase/Network/Email/SmtpTransportTest.php
Expand Up @@ -131,7 +131,7 @@ public function testConnectEhloTls() {
/**
* testConnectEhloTlsOnNonTlsServer method
*
* @expectedException \Cake\Network\Error\SocketException
* @expectedException Cake\Network\Exception\SocketException
* @expectedExceptionMessage SMTP server did not accept the connection or trying to connect to non TLS SMTP server using TLS.
* @return void
*/
Expand All @@ -152,7 +152,7 @@ public function testConnectEhloTlsOnNonTlsServer() {
/**
* testConnectEhloNoTlsOnRequiredTlsServer method
*
* @expectedException \Cake\Network\Error\SocketException
* @expectedException Cake\Network\Exception\SocketException
* @expectedExceptionMessage SMTP authentication method not allowed, check if SMTP server requires TLS.
* @return void
*/
Expand Down Expand Up @@ -191,7 +191,7 @@ public function testConnectHelo() {
/**
* testConnectFail method
*
* @expectedException \Cake\Network\Error\SocketException
* @expectedException Cake\Network\Exception\SocketException
* @expectedExceptionMessage SMTP server did not accept the connection.
* @return void
*/
Expand Down Expand Up @@ -230,7 +230,7 @@ public function testAuth() {
/**
* testAuthNotRecognized method
*
* @expectedException Cake\Network\Error\SocketException
* @expectedException \Cake\Network\Exception\SocketException
* @expectedExceptionMessage AUTH command not recognized or not implemented, SMTP server may not require authentication.
* @return void
*/
Expand All @@ -245,7 +245,7 @@ public function testAuthNotRecognized() {
/**
* testAuthNotImplemented method
*
* @expectedException Cake\Network\Error\SocketException
* @expectedException \Cake\Network\Exception\SocketException
* @expectedExceptionMessage AUTH command not recognized or not implemented, SMTP server may not require authentication.
* @return void
*/
Expand All @@ -260,7 +260,7 @@ public function testAuthNotImplemented() {
/**
* testAuthBadSequence method
*
* @expectedException Cake\Network\Error\SocketException
* @expectedException \Cake\Network\Exception\SocketException
* @expectedExceptionMessage SMTP Error: 503 5.5.1 Already authenticated
* @return void
*/
Expand All @@ -275,7 +275,7 @@ public function testAuthBadSequence() {
/**
* testAuthBadUsername method
*
* @expectedException Cake\Network\Error\SocketException
* @expectedException \Cake\Network\Exception\SocketException
* @expectedExceptionMessage SMTP server did not accept the username.
* @return void
*/
Expand All @@ -293,7 +293,7 @@ public function testAuthBadUsername() {
/**
* testAuthBadPassword method
*
* @expectedException Cake\Network\Error\SocketException
* @expectedException \Cake\Network\Exception\SocketException
* @expectedExceptionMessage SMTP server did not accept the password.
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase/Network/RequestTest.php
Expand Up @@ -684,7 +684,7 @@ public function testisAjaxFlashAndFriends() {
/**
* Test __call exceptions
*
* @expectedException \Cake\Core\Exception\Exception
* @expectedException BadMethodCallException
* @return void
*/
public function testMagicCallExceptionOnUnknownMethod() {
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Network/ResponseTest.php
Expand Up @@ -1158,7 +1158,7 @@ public function corsData() {
/**
* testFileNotFound
*
* @expectedException InvalidArgumentException
* @expectedException Cake\Network\Exception\NotFoundException
* @return void
*/
public function testFileNotFound() {
Expand All @@ -1169,7 +1169,7 @@ public function testFileNotFound() {
/**
* test file with ..
*
* @expectedException InvalidArgumentException
* @expectedException Cake\Network\Exception\NotFoundException
* @return void
*/
public function testFileWithPathTraversal() {
Expand Down
22 changes: 11 additions & 11 deletions tests/TestCase/Network/SocketTest.php
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\Error\SocketException $e) {
} catch (Cake\Network\Exception\SocketException $e) {
$this->markTestSkipped('Cannot test network, skipping.');
}
}
Expand All @@ -116,7 +116,7 @@ public static function invalidConnections() {
* testInvalidConnection method
*
* @dataProvider invalidConnections
* @expectedException \Cake\Network\Error\SocketException
* @expectedException Cake\Network\Exception\SocketException
* @return void
*/
public function testInvalidConnection($data) {
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\Error\SocketException $e) {
} catch (Cake\Network\Exception\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\Error\SocketException $e) {
} catch (Cake\Network\Exception\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\Error\SocketException $e) {
} catch (Cake\Network\Exception\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\Error\SocketException $e) {
} catch (Cake\Network\Exception\SocketException $e) {
$this->markTestSkipped('Cannot test network, skipping.');
}
}
Expand Down Expand Up @@ -248,7 +248,7 @@ public function testReset() {
/**
* testEncrypt
*
* @expectedException \Cake\Network\Error\SocketException
* @expectedException Cake\Network\Exception\SocketException
* @return void
*/
public function testEnableCryptoSocketExceptionNoSsl() {
Expand All @@ -264,7 +264,7 @@ public function testEnableCryptoSocketExceptionNoSsl() {
/**
* testEnableCryptoSocketExceptionNoTls
*
* @expectedException \Cake\Network\Error\SocketException
* @expectedException Cake\Network\Exception\SocketException
* @return void
*/
public function testEnableCryptoSocketExceptionNoTls() {
Expand All @@ -287,7 +287,7 @@ protected function _connectSocketToSslTls() {
$this->Socket = new Socket($configSslTls);
try {
$this->Socket->connect();
} catch (\Cake\Network\Error\SocketException $e) {
} catch (Cake\Network\Exception\SocketException $e) {
$this->markTestSkipped('Cannot test network, skipping.');
}
}
Expand Down Expand Up @@ -326,7 +326,7 @@ public function testEnableCrypto() {
/**
* testEnableCryptoExceptionEnableTwice
*
* @expectedException \Cake\Network\Error\SocketException
* @expectedException Cake\Network\Exception\SocketException
* @return void
*/
public function testEnableCryptoExceptionEnableTwice() {
Expand All @@ -340,7 +340,7 @@ public function testEnableCryptoExceptionEnableTwice() {
/**
* testEnableCryptoExceptionDisableTwice
*
* @expectedException \Cake\Network\Error\SocketException
* @expectedException Cake\Network\Exception\SocketException
* @return void
*/
public function testEnableCryptoExceptionDisableTwice() {
Expand Down

0 comments on commit 240f586

Please sign in to comment.