Fixing Socket test to run on non-standard virtual host configurations

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6800 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2008-05-11 16:42:19 +00:00
parent ce01acfbdf
commit 7f090c0cc6

View file

@ -86,14 +86,14 @@ class SocketTest extends UnitTestCase {
$this->Socket = new CakeSocket();
$this->Socket->connect();
$this->assertEqual($this->Socket->address(), '127.0.0.1');
$this->assertPattern('/local/', $this->Socket->host());
$this->assertEqual(gethostbyaddr('127.0.0.1'), $this->Socket->host());
$this->assertEqual($this->Socket->lastError(), null);
$this->assertTrue(in_array('127.0.0.1', $this->Socket->addresses()));
$this->Socket = new CakeSocket(array('host' => '127.0.0.1'));
$this->Socket->connect();
$this->assertEqual($this->Socket->address(), '127.0.0.1');
$this->assertPattern('/local/', $this->Socket->host());
$this->assertEqual(gethostbyaddr('127.0.0.1'), $this->Socket->host());
$this->assertEqual($this->Socket->lastError(), null);
$this->assertTrue(in_array('127.0.0.1', $this->Socket->addresses()));
}