Skip to content
This repository
Browse code

Revert "Make test a bit more solid."

This reverts commit 072991d.
  • Loading branch information...
commit 21a51a374a9ef8e1cd8bf7f890e1e25b279016bb 1 parent 072991d
Mark Story authored September 01, 2012
11  lib/Cake/Test/Case/Network/CakeSocketTest.php
@@ -179,18 +179,11 @@ public function testTimeOutConnection() {
179 179
 		$config = array('host' => '127.0.0.1', 'timeout' => 0.5);
180 180
 		$this->Socket = new CakeSocket($config);
181 181
 		$this->assertTrue($this->Socket->connect());
182  
-	}
183 182
 
184  
-/**
185  
- * test timing out raises exception
186  
- *
187  
- * @expectedException SocketException
188  
- * @expectedExceptionMessage Operation timed out
189  
- */
190  
-	public function testTimeOutThrowException() {
191 183
 		$config = array('host' => '127.0.0.1', 'timeout' => 0.00001);
192 184
 		$this->Socket = new CakeSocket($config);
193  
-		$this->Socket->read(1024 * 1024);
  185
+		$this->assertFalse($this->Socket->read(1024 * 1024));
  186
+		$this->assertEquals('2: ' . __d('cake_dev', 'Connection timed out'), $this->Socket->lastError());
194 187
 	}
195 188
 
196 189
 /**

0 notes on commit 21a51a3

Please sign in to comment.
Something went wrong with that request. Please try again.