From 3039645a179f1de68e0479f79bec44529ef6497e Mon Sep 17 00:00:00 2001 From: predominant Date: Sun, 4 Apr 2010 18:34:49 +1000 Subject: [PATCH] Fix testing of protected baseConfig in CakeSocket. --- cake/tests/cases/libs/cake_socket.test.php | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/cake/tests/cases/libs/cake_socket.test.php b/cake/tests/cases/libs/cake_socket.test.php index 7b49d9cec..de0774ae4 100644 --- a/cake/tests/cases/libs/cake_socket.test.php +++ b/cake/tests/cases/libs/cake_socket.test.php @@ -55,29 +55,28 @@ class CakeSocketTest extends CakeTestCase { */ function testConstruct() { $this->Socket->__construct(); - $baseConfig = $this->Socket->_baseConfig; - $this->assertIdentical($baseConfig, array( + $config = $this->Socket->config; + $this->assertIdentical($config, array( 'persistent' => false, 'host' => 'localhost', - 'protocol' => 'tcp', + 'protocol' => getprotobyname('tcp'), 'port' => 80, 'timeout' => 30 )); $this->Socket->reset(); $this->Socket->__construct(array('host' => 'foo-bar')); - $baseConfig['host'] = 'foo-bar'; - $baseConfig['protocol'] = getprotobyname($baseConfig['protocol']); - $this->assertIdentical($this->Socket->config, $baseConfig); + $config['host'] = 'foo-bar'; + $this->assertIdentical($this->Socket->config, $config); $this->Socket = new CakeSocket(array('host' => 'www.cakephp.org', 'port' => 23, 'protocol' => 'udp')); - $baseConfig = $this->Socket->_baseConfig; + $config = $this->Socket->config; - $baseConfig['host'] = 'www.cakephp.org'; - $baseConfig['port'] = 23; - $baseConfig['protocol'] = 17; + $config['host'] = 'www.cakephp.org'; + $config['port'] = 23; + $config['protocol'] = 17; - $this->assertIdentical($this->Socket->config, $baseConfig); + $this->assertIdentical($this->Socket->config, $config); } /**