Permalink
Browse files

Renamed SoapClient to SimpleSoapClient

  • Loading branch information...
1 parent d29f0ca commit a46a42412ef8837ef58c07c44b3a8dce657c266b @aschamberger aschamberger committed Sep 26, 2011
View
@@ -1 +1,5 @@
vendor
+/phpunit.xml
+.buildpath
+.project
+.settings
@@ -18,7 +18,7 @@
/**
* @author Francis Besset <francis.besset@gmail.com>
*/
-class SoapClient
+class SimpleSoapClient
{
protected $wsdl;
protected $converters;
@@ -16,13 +16,13 @@
use BeSimple\SoapCommon\Converter\DateTimeTypeConverter;
use BeSimple\SoapCommon\Converter\DateTypeConverter;
use BeSimple\SoapCommon\Converter\TypeConverterCollection;
-use BeSimple\SoapClient\SoapClient;
+use BeSimple\SoapClient\SimpleSoapClient;
class SoapClientTest extends \PHPUnit_Framework_TestCase
{
public function testSetOptions()
{
- $soapClient = new SoapClient('foo.wsdl');
+ $soapClient = new SimpleSoapClient('foo.wsdl');
$options = array(
'cache_type' => Cache::TYPE_DISK_MEMORY,
'debug' => true,
@@ -35,39 +35,39 @@ public function testSetOptions()
public function testSetOptionsThrowsAnExceptionIfOptionsDoesNotExists()
{
- $soapClient = new SoapClient('foo.wsdl');
+ $soapClient = new SimpleSoapClient('foo.wsdl');
$this->setExpectedException('InvalidArgumentException');
$soapClient->setOptions(array('bad_option' => true));
}
public function testSetOption()
{
- $soapClient = new SoapClient('foo.wsdl');
+ $soapClient = new SimpleSoapClient('foo.wsdl');
$soapClient->setOption('debug', true);
$this->assertEquals(true, $soapClient->getOption('debug'));
}
public function testSetOptionThrowsAnExceptionIfOptionDoesNotExists()
{
- $soapClient = new SoapClient('foo.wsdl');
+ $soapClient = new SimpleSoapClient('foo.wsdl');
$this->setExpectedException('InvalidArgumentException');
$soapClient->setOption('bad_option', 'bar');
}
public function testGetOptionThrowsAnExceptionIfOptionDoesNotExists()
{
- $soapClient = new SoapClient('foo.wsdl');
+ $soapClient = new SimpleSoapClient('foo.wsdl');
$this->setExpectedException('InvalidArgumentException');
$soapClient->getOption('bad_option');
}
public function testCreateSoapHeader()
{
- $soapClient = new SoapClient('foo.wsdl', null, array('namespace' => 'http://foobar/soap/User/1.0/'));
+ $soapClient = new SimpleSoapClient('foo.wsdl', null, array('namespace' => 'http://foobar/soap/User/1.0/'));
$soapHeader = $soapClient->createSoapHeader('foo', 'bar');
$this->assertInstanceOf('SoapHeader', $soapHeader);
@@ -78,7 +78,7 @@ public function testCreateSoapHeader()
public function testCreateSoapHeaderThrowsAnExceptionIfNamespaceIsNull()
{
- $soapClient = new SoapClient('foo.wsdl');
+ $soapClient = new SimpleSoapClient('foo.wsdl');
$this->setExpectedException('RuntimeException');
$soapHeader = $soapClient->createSoapHeader('foo', 'bar');
@@ -87,10 +87,10 @@ public function testCreateSoapHeaderThrowsAnExceptionIfNamespaceIsNull()
public function testGetSoapOptions()
{
Cache::setType(Cache::TYPE_MEMORY);
- $soapClient = new SoapClient('foo.wsdl', null, array('debug' => true));
+ $soapClient = new SimpleSoapClient('foo.wsdl', null, array('debug' => true));
$this->assertEquals(array('cache_wsdl' => Cache::getType(), 'trace' => true, 'typemap' => array()), $soapClient->getSoapOptions());
- $soapClient = new SoapClient('foo.wsdl', null, array('debug' => false, 'cache_type' => Cache::TYPE_NONE));
+ $soapClient = new SimpleSoapClient('foo.wsdl', null, array('debug' => false, 'cache_type' => Cache::TYPE_NONE));
$this->assertEquals(array('cache_wsdl' => Cache::TYPE_NONE, 'trace' => false, 'typemap' => array()), $soapClient->getSoapOptions());
}
@@ -104,7 +104,7 @@ public function testGetSoapOptionsWithTypemap()
$dateTypeConverter = new DateTypeConverter();
$converters->add($dateTypeConverter);
- $soapClient = new SoapClient('foo.wsdl', $converters);
+ $soapClient = new SimpleSoapClient('foo.wsdl', $converters);
$soapOptions = $soapClient->getSoapOptions();
$this->assertEquals('http://www.w3.org/2001/XMLSchema', $soapOptions['typemap'][0]['type_ns']);
@@ -120,7 +120,7 @@ public function testGetSoapOptionsWithTypemap()
public function testGetNativeSoapClient()
{
- $soapClient = new SoapClient(__DIR__.'/Fixtures/foobar.wsdl', null, array('debug' => true));
+ $soapClient = new SimpleSoapClient(__DIR__.'/Fixtures/foobar.wsdl', null, array('debug' => true));
$this->assertInstanceOf('SoapClient', $soapClient->getNativeSoapClient());
}

0 comments on commit a46a424

Please sign in to comment.