From a46a42412ef8837ef58c07c44b3a8dce657c266b Mon Sep 17 00:00:00 2001 From: Andreas Schamberger Date: Mon, 26 Sep 2011 15:52:03 +0200 Subject: [PATCH] Renamed SoapClient to SimpleSoapClient --- .gitignore | 4 ++++ .../{SoapClient.php => SimpleSoapClient.php} | 2 +- ...lientTest.php => SimpleSoapClientTest.php} | 24 +++++++++---------- 3 files changed, 17 insertions(+), 13 deletions(-) rename src/BeSimple/SoapClient/{SoapClient.php => SimpleSoapClient.php} (99%) rename tests/BeSimple/Tests/SoapClient/{SoapClientTest.php => SimpleSoapClientTest.php} (81%) diff --git a/.gitignore b/.gitignore index 22d0d82..f8d178e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ vendor +/phpunit.xml +.buildpath +.project +.settings \ No newline at end of file diff --git a/src/BeSimple/SoapClient/SoapClient.php b/src/BeSimple/SoapClient/SimpleSoapClient.php similarity index 99% rename from src/BeSimple/SoapClient/SoapClient.php rename to src/BeSimple/SoapClient/SimpleSoapClient.php index 6832ecb..64b8991 100644 --- a/src/BeSimple/SoapClient/SoapClient.php +++ b/src/BeSimple/SoapClient/SimpleSoapClient.php @@ -18,7 +18,7 @@ use BeSimple\SoapCommon\Converter\TypeConverterCollection; /** * @author Francis Besset */ -class SoapClient +class SimpleSoapClient { protected $wsdl; protected $converters; diff --git a/tests/BeSimple/Tests/SoapClient/SoapClientTest.php b/tests/BeSimple/Tests/SoapClient/SimpleSoapClientTest.php similarity index 81% rename from tests/BeSimple/Tests/SoapClient/SoapClientTest.php rename to tests/BeSimple/Tests/SoapClient/SimpleSoapClientTest.php index 34e9561..89b8ef7 100644 --- a/tests/BeSimple/Tests/SoapClient/SoapClientTest.php +++ b/tests/BeSimple/Tests/SoapClient/SimpleSoapClientTest.php @@ -16,13 +16,13 @@ use BeSimple\SoapCommon\Cache; 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,7 +35,7 @@ class SoapClientTest extends \PHPUnit_Framework_TestCase public function testSetOptionsThrowsAnExceptionIfOptionsDoesNotExists() { - $soapClient = new SoapClient('foo.wsdl'); + $soapClient = new SimpleSoapClient('foo.wsdl'); $this->setExpectedException('InvalidArgumentException'); $soapClient->setOptions(array('bad_option' => true)); @@ -43,7 +43,7 @@ class SoapClientTest extends \PHPUnit_Framework_TestCase public function testSetOption() { - $soapClient = new SoapClient('foo.wsdl'); + $soapClient = new SimpleSoapClient('foo.wsdl'); $soapClient->setOption('debug', true); $this->assertEquals(true, $soapClient->getOption('debug')); @@ -51,7 +51,7 @@ class SoapClientTest extends \PHPUnit_Framework_TestCase public function testSetOptionThrowsAnExceptionIfOptionDoesNotExists() { - $soapClient = new SoapClient('foo.wsdl'); + $soapClient = new SimpleSoapClient('foo.wsdl'); $this->setExpectedException('InvalidArgumentException'); $soapClient->setOption('bad_option', 'bar'); @@ -59,7 +59,7 @@ class SoapClientTest extends \PHPUnit_Framework_TestCase public function testGetOptionThrowsAnExceptionIfOptionDoesNotExists() { - $soapClient = new SoapClient('foo.wsdl'); + $soapClient = new SimpleSoapClient('foo.wsdl'); $this->setExpectedException('InvalidArgumentException'); $soapClient->getOption('bad_option'); @@ -67,7 +67,7 @@ class SoapClientTest extends \PHPUnit_Framework_TestCase 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 @@ class SoapClientTest extends \PHPUnit_Framework_TestCase 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 @@ class SoapClientTest extends \PHPUnit_Framework_TestCase 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 @@ class SoapClientTest extends \PHPUnit_Framework_TestCase $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 @@ class SoapClientTest extends \PHPUnit_Framework_TestCase 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()); }