Renamed client cache_wsdl option to cache_type

This commit is contained in:
Francis Besset 2011-09-04 12:15:11 +02:00
parent 358373dcc8
commit caeb484e19
2 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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());
}