mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
parent
072991d0da
commit
21a51a374a
1 changed files with 2 additions and 9 deletions
|
@ -179,18 +179,11 @@ class CakeSocketTest extends CakeTestCase {
|
|||
$config = array('host' => '127.0.0.1', 'timeout' => 0.5);
|
||||
$this->Socket = new CakeSocket($config);
|
||||
$this->assertTrue($this->Socket->connect());
|
||||
}
|
||||
|
||||
/**
|
||||
* test timing out raises exception
|
||||
*
|
||||
* @expectedException SocketException
|
||||
* @expectedExceptionMessage Operation timed out
|
||||
*/
|
||||
public function testTimeOutThrowException() {
|
||||
$config = array('host' => '127.0.0.1', 'timeout' => 0.00001);
|
||||
$this->Socket = new CakeSocket($config);
|
||||
$this->Socket->read(1024 * 1024);
|
||||
$this->assertFalse($this->Socket->read(1024 * 1024));
|
||||
$this->assertEquals('2: ' . __d('cake_dev', 'Connection timed out'), $this->Socket->lastError());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue