From caeb484e19043ffb961fc5ba09e7d9a45bd18d96 Mon Sep 17 00:00:00 2001 From: Francis Besset Date: Sun, 4 Sep 2011 12:15:11 +0200 Subject: [PATCH] Renamed client cache_wsdl option to cache_type --- src/BeSimple/SoapClient/SoapClient.php | 8 ++++---- tests/BeSimple/Tests/SoapClient/SoapClientTest.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/BeSimple/SoapClient/SoapClient.php b/src/BeSimple/SoapClient/SoapClient.php index c335a2e..5bcf5d6 100644 --- a/src/BeSimple/SoapClient/SoapClient.php +++ b/src/BeSimple/SoapClient/SoapClient.php @@ -36,7 +36,7 @@ class SoapClient { $this->options = array( 'debug' => false, - 'cache_wsdl' => null, + 'cache_type' => null, ); // check option names and live merge, if errors are encountered Exception will be thrown @@ -137,11 +137,11 @@ class SoapClient { $options = array(); - if (null === $this->options['cache_wsdl']) { - $this->options['cache_wsdl'] = Cache::getType(); + if (null === $this->options['cache_type']) { + $this->options['cache_type'] = Cache::getType(); } - $options['cache_wsdl'] = $this->options['cache_wsdl']; + $options['cache_wsdl'] = $this->options['cache_type']; $options['trace'] = $this->options['debug']; return $options; diff --git a/tests/BeSimple/Tests/SoapClient/SoapClientTest.php b/tests/BeSimple/Tests/SoapClient/SoapClientTest.php index 7d9d4dd..aa20ec3 100644 --- a/tests/BeSimple/Tests/SoapClient/SoapClientTest.php +++ b/tests/BeSimple/Tests/SoapClient/SoapClientTest.php @@ -21,7 +21,7 @@ class SoapClientTest extends \PHPUnit_Framework_TestCase { $soapClient = new SoapClient('foo.wsdl'); $options = array( - 'cache_wsdl' => Cache::TYPE_DISK_MEMORY, + 'cache_type' => Cache::TYPE_DISK_MEMORY, 'debug' => true, ); $soapClient->setOptions($options); @@ -67,7 +67,7 @@ class SoapClientTest extends \PHPUnit_Framework_TestCase $soapClient = new SoapClient('foo.wsdl', array('debug' => true)); $this->assertEquals(array('cache_wsdl' => Cache::getType(), 'trace' => true), $soapClient->getSoapOptions()); - $soapClient = new SoapClient('foo.wsdl', array('debug' => false, 'cache_wsdl' => Cache::TYPE_NONE)); + $soapClient = new SoapClient('foo.wsdl', array('debug' => false, 'cache_type' => Cache::TYPE_NONE)); $this->assertEquals(array('cache_wsdl' => Cache::TYPE_NONE, 'trace' => false), $soapClient->getSoapOptions()); }