Merge branch 'fixed_tests'

This commit is contained in:
Francis Besset 2014-08-14 13:39:12 +02:00
commit fe67cff5ff
15 changed files with 150 additions and 110 deletions

View File

@ -10,10 +10,14 @@ env:
- SYMFONY_VERSION=2.1.* - SYMFONY_VERSION=2.1.*
- SYMFONY_VERSION=2.2.* - SYMFONY_VERSION=2.2.*
- SYMFONY_VERSION=2.3.* - SYMFONY_VERSION=2.3.*
- SYMFONY_VERSION=dev-master - SYMFONY_VERSION=2.4.*
- SYMFONY_VERSION=2.5.*
- SYMFONY_VERSION="dev-master symfony/debug:~2.6@dev symfony/http-kernel:~2.6@dev"
before_script: before_script:
- composer require symfony/http-foundation:${SYMFONY_VERSION} --no-interaction --prefer-source - composer self-update
- composer require symfony/framework-bundle:${SYMFONY_VERSION} --no-update
- composer update --no-interaction --prefer-source
- ./src/BeSimple/SoapClient/Tests/bin/phpwebserver.sh - ./src/BeSimple/SoapClient/Tests/bin/phpwebserver.sh
- ./src/BeSimple/SoapClient/Tests/bin/axis.sh - ./src/BeSimple/SoapClient/Tests/bin/axis.sh
@ -22,4 +26,4 @@ script:
matrix: matrix:
allow_failures: allow_failures:
- env: SYMFONY_VERSION=dev-master - env: SYMFONY_VERSION="dev-master symfony/debug:~2.6@dev symfony/http-kernel:~2.6@dev"

View File

@ -37,14 +37,13 @@
}, },
"require-dev": { "require-dev": {
"ext-mcrypt": "*", "ext-mcrypt": "*",
"mikey179/vfsStream": "dev-master", "mikey179/vfsStream": "~1.0",
"symfony/filesystem": "~2.3", "symfony/filesystem": "~2.0",
"symfony/process": "~2.3" "symfony/process": "~2.3"
}, },
"autoload": { "autoload": {
"psr-0": { "BeSimple\\": "src/" } "psr-0": { "BeSimple\\": "src/" }
}, },
"minimum-stability": "dev",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "0.2-dev" "dev-master": "0.2-dev"

View File

@ -16,66 +16,70 @@ use BeSimple\SoapBundle\ServiceBinding\RpcLiteralRequestMessageBinder;
use BeSimple\SoapBundle\ServiceDefinition as Definition; use BeSimple\SoapBundle\ServiceDefinition as Definition;
use BeSimple\SoapBundle\Tests\fixtures\ServiceBinding as Fixtures; use BeSimple\SoapBundle\Tests\fixtures\ServiceBinding as Fixtures;
use BeSimple\SoapBundle\Util\Collection; use BeSimple\SoapBundle\Util\Collection;
use BeSimple\SoapCommon\Definition\Type\ComplexType;
use BeSimple\SoapCommon\Definition\Type\TypeRepository;
class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase
{ {
/** /**
* @dataProvider messageProvider * @dataProvider messageProvider
*/ */
public function testProcessMessage(Definition\Method $method, $message, $assert) public function testProcessMessage(Definition\Method $method, array $message, array $assert)
{ {
$messageBinder = new RpcLiteralRequestMessageBinder(); $messageBinder = new RpcLiteralRequestMessageBinder();
$result = $messageBinder->processMessage($method, $message); $result = $messageBinder->processMessage($method, $message, $this->getTypeRepository());
$this->assertSame($assert, $result); $this->assertSame($assert, $result);
} }
public function testProcessMessageWithComplexType() public function testProcessMessageWithComplexType()
{ {
$typeRepository = $this->addComplexTypes($this->getTypeRepository());
$messageBinder = new RpcLiteralRequestMessageBinder(); $messageBinder = new RpcLiteralRequestMessageBinder();
$method = new Definition\Method('complextype_argument', null);
$method->addInput('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo');
$foo = new Fixtures\Foo('foobar', 19395); $foo = new Fixtures\Foo('foobar', 19395);
$result = $messageBinder->processMessage( $result = $messageBinder->processMessage(
new Definition\Method('complextype_argument', null, array(), array( $method,
new Definition\Argument('foo', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo')),
)),
array($foo), array($foo),
$this->getDefinitionComplexTypes() $typeRepository
); );
$this->assertEquals(array('foo' => $foo), $result); $this->assertEquals(array('foo' => $foo), $result);
$foo1 = new Fixtures\Foo('foobar', 29291); $foo1 = new Fixtures\Foo('foobar', 29291);
$foo2 = new Fixtures\Foo('barfoo', 39392); $foo2 = new Fixtures\Foo('barfoo', 39392);
$foos = new \stdClass(); $foos = new \stdClass();
$foos->item = array($foo1, $foo2); $foos->item = array($foo1, $foo2);
$method = new Definition\Method('complextype_argument', null);
$method->addInput('foos', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo[]');
$result = $messageBinder->processMessage( $result = $messageBinder->processMessage(
new Definition\Method('complextype_argument', null, array(), array( $method,
new Definition\Argument('foos', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo[]')),
)),
array($foos), array($foos),
$this->getDefinitionComplexTypes() $typeRepository
); );
$this->assertEquals(array('foos' => array($foo1, $foo2)), $result); $this->assertEquals(array('foos' => array($foo1, $foo2)), $result);
} }
/**
* @expectedException SoapFault
*/
public function testProcessMessageSoapFault() public function testProcessMessageSoapFault()
{ {
$messageBinder = new RpcLiteralRequestMessageBinder(); $messageBinder = new RpcLiteralRequestMessageBinder();
$method = new Definition\Method('complextype_argument', null);
$method->addInput('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo');
$foo = new Fixtures\Foo('foo', null); $foo = new Fixtures\Foo('foo', null);
$result = $messageBinder->processMessage(
new Definition\Method('complextype_argument', null, array(), array( $this->setExpectedException('SoapFault');
new Definition\Argument('foo', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo')), $messageBinder->processMessage(
)), $method,
array($foo), array($foo),
$this->getDefinitionComplexTypes() $this->addComplexTypes($this->getTypeRepository())
); );
} }
@ -83,16 +87,17 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase
{ {
$messageBinder = new RpcLiteralRequestMessageBinder(); $messageBinder = new RpcLiteralRequestMessageBinder();
$method = new Definition\Method('complextype_argument', null);
$method->addInput('foos', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo[]');
$foo = new Fixtures\Foo('foo', 2499104); $foo = new Fixtures\Foo('foo', 2499104);
$foos = new \stdClass(); $foos = new \stdClass();
$foos->item = array($foo, $foo); $foos->item = array($foo, $foo);
$result = $messageBinder->processMessage( $result = $messageBinder->processMessage(
new Definition\Method('complextype_argument', null, array(), array( $method,
new Definition\Argument('foos', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo[]')),
)),
array($foos), array($foos),
$this->getDefinitionComplexTypes() $this->addComplexTypes($this->getTypeRepository())
); );
$this->assertEquals(array('foos' => array($foo, $foo)), $result); $this->assertEquals(array('foos' => array($foo, $foo)), $result);
@ -102,16 +107,17 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase
{ {
$messageBinder = new RpcLiteralRequestMessageBinder(); $messageBinder = new RpcLiteralRequestMessageBinder();
$method = new Definition\Method('complextype_argument', null);
$method->addInput('fooBar', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooBar');
$foo = new Fixtures\Foo('foo', 38845); $foo = new Fixtures\Foo('foo', 38845);
$bar = new Fixtures\Bar('bar', null); $bar = new Fixtures\Bar('bar', null);
$fooBar = new Fixtures\FooBar($foo, $bar); $fooBar = new Fixtures\FooBar($foo, $bar);
$result = $messageBinder->processMessage( $result = $messageBinder->processMessage(
new Definition\Method('complextype_argument', null, array(), array( $method,
new Definition\Argument('fooBar', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooBar')),
)),
array($fooBar), array($fooBar),
$this->getDefinitionComplexTypes() $this->addComplexTypes($this->getTypeRepository())
); );
$this->assertEquals(array('fooBar' => $fooBar), $result); $this->assertEquals(array('fooBar' => $fooBar), $result);
@ -121,17 +127,18 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase
{ {
$messageBinder = new RpcLiteralRequestMessageBinder(); $messageBinder = new RpcLiteralRequestMessageBinder();
$method = new Definition\Method('complextype_with_array', null);
$method->addInput('simple_arrays', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\SimpleArrays');
$array = array(1, 2, 3, 4); $array = array(1, 2, 3, 4);
$stdClass = new \stdClass(); $stdClass = new \stdClass();
$stdClass->item = $array; $stdClass->item = $array;
$simpleArrays = new Fixtures\SimpleArrays(null, new \stdClass(), $stdClass); $simpleArrays = new Fixtures\SimpleArrays(null, new \stdClass(), $stdClass);
$result = $messageBinder->processMessage( $result = $messageBinder->processMessage(
new Definition\Method('complextype_with_array', null, array(), array( $method,
new Definition\Argument('simple_arrays', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\SimpleArrays')),
)),
array($simpleArrays), array($simpleArrays),
$this->getDefinitionComplexTypes() $this->addComplexTypes($this->getTypeRepository())
); );
$result = $result['simple_arrays']; $result = $result['simple_arrays'];
@ -144,12 +151,13 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase
{ {
$messageBinder = new RpcLiteralRequestMessageBinder(); $messageBinder = new RpcLiteralRequestMessageBinder();
$method = new Definition\Method('empty_array_complex_type', null);
$method->addInput('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo[]');
$result = $messageBinder->processMessage( $result = $messageBinder->processMessage(
new Definition\Method('empty_array_complex_type', null, array(), array( $method,
new Definition\Argument('foo', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo[]')),
)),
array(new \stdClass()), array(new \stdClass()),
$this->getDefinitionComplexTypes() $this->addComplexTypes($this->getTypeRepository())
); );
$this->assertEquals(array('foo' => array()), $result); $this->assertEquals(array('foo' => array()), $result);
@ -159,16 +167,17 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase
{ {
$messageBinder = new RpcLiteralRequestMessageBinder(); $messageBinder = new RpcLiteralRequestMessageBinder();
$method = new Definition\Method('prevent_infinite_recursion', null);
$method->addInput('foo_recursive', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooRecursive');
$foo = new Fixtures\FooRecursive('foo', ''); $foo = new Fixtures\FooRecursive('foo', '');
$bar = new Fixtures\BarRecursive($foo, 10394); $bar = new Fixtures\BarRecursive($foo, 10394);
$foo->bar = $bar; $foo->bar = $bar;
$result = $messageBinder->processMessage( $result = $messageBinder->processMessage(
new Definition\Method('prevent_infinite_recursion', null, array(), array( $method,
new Definition\Argument('foo_recursive', new Definition\Type('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooRecursive')),
)),
array($foo), array($foo),
$this->getDefinitionComplexTypes() $this->addComplexTypes($this->getTypeRepository())
); );
$this->assertEquals(array('foo_recursive' => $foo), $result); $this->assertEquals(array('foo_recursive' => $foo), $result);
@ -179,43 +188,43 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase
$messages = array(); $messages = array();
$messages[] = array( $messages[] = array(
new Definition\Method('no_argument'), new Definition\Method('no_argument', null),
array(), array(),
array(), array(),
); );
$method = new Definition\Method('string_argument', null);
$method->addInput('foo', 'string');
$messages[] = array( $messages[] = array(
new Definition\Method('string_argument', null, array(), array( $method,
new Definition\Argument('foo', new Definition\Type('string')),
)),
array('bar'), array('bar'),
array('foo' => 'bar'), array('foo' => 'bar'),
); );
$method = new Definition\Method('string_int_arguments', null);
$method->addInput('foo', 'string');
$method->addInput('bar', 'int');
$messages[] = array( $messages[] = array(
new Definition\Method('string_int_arguments', null, array(), array( $method,
new Definition\Argument('foo', new Definition\Type('string')),
new Definition\Argument('bar', new Definition\Type('int')),
)),
array('test', 20), array('test', 20),
array('foo' => 'test', 'bar' => 20), array('foo' => 'test', 'bar' => 20),
); );
$method = new Definition\Method('array_string_arguments', null);
$method->addInput('foo', 'string[]');
$method->addInput('bar', 'int');
$strings = new \stdClass(); $strings = new \stdClass();
$strings->item = array('foo', 'bar', 'barfoo'); $strings->item = array('foo', 'bar', 'barfoo');
$messages[] = array( $messages[] = array(
new Definition\Method('array_string_arguments', null, array(), array( $method,
new Definition\Argument('foo', new Definition\Type('string[]')),
new Definition\Argument('bar', new Definition\Type('int')),
)),
array($strings, 4), array($strings, 4),
array('foo' => array('foo', 'bar', 'barfoo'), 'bar' => 4), array('foo' => array('foo', 'bar', 'barfoo'), 'bar' => 4),
); );
$method = new Definition\Method('empty_array', null);
$method->addInput('foo', 'string[]');
$messages[] = array( $messages[] = array(
new Definition\Method('empty_array', null, array(), array( $method,
new Definition\Argument('foo', new Definition\Type('string[]')),
)),
array(new \stdClass()), array(new \stdClass()),
array('foo' => array()), array('foo' => array()),
); );
@ -223,40 +232,38 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase
return $messages; return $messages;
} }
private function getDefinitionComplexTypes() private function addComplexTypes(TypeRepository $typeRepository)
{ {
$definitionComplexTypes = array(); $foo = new ComplexType('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo', 'Foo');
$foo->add('foo', 'string');
$foo->add('bar', 'int');
$typeRepository->addComplexType($foo);
$definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo'] = $this->createComplexTypeCollection(array( $bar = new ComplexType('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Bar', 'Bar');
array('foo', 'string'), $bar->add('foo', 'string');
array('bar', 'int'), $bar->add('bar', 'int', true);
)); $typeRepository->addComplexType($bar);
$definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Bar'] = $this->createComplexTypeCollection(array( $fooBar = new ComplexType('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooBar', 'FooBar');
array('foo', 'string'), $fooBar->add('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo');
array('bar', 'int', true), $fooBar->add('bar', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Bar');
)); $typeRepository->addComplexType($fooBar);
$definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooBar'] = $this->createComplexTypeCollection(array( $simpleArrays = new ComplexType('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\SimpleArrays', 'SimpleArrays');
array('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Foo'), $simpleArrays->add('array1', 'string[]', true);
array('bar', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\Bar'), $simpleArrays->add('array2', 'string[]');
)); $simpleArrays->add('array3', 'string[]');
$typeRepository->addComplexType($simpleArrays);
$definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\SimpleArrays'] = $this->createComplexTypeCollection(array( $fooRecursive = new ComplexType('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooRecursive', 'FooRecursive');
array('array1', 'string[]', true), $fooRecursive->add('bar', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\BarRecursive');
array('array2', 'string[]'), $typeRepository->addComplexType($fooRecursive);
array('array3', 'string[]'),
));
$definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooRecursive'] = $this->createComplexTypeCollection(array( $barRecursive = new ComplexType('BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\BarRecursive', 'BarRecursive');
array('bar', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\BarRecursive'), $barRecursive->add('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooRecursive');
)); $typeRepository->addComplexType($barRecursive);
$definitionComplexTypes['BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\BarRecursive'] = $this->createComplexTypeCollection(array( return $typeRepository;
array('foo', 'BeSimple\SoapBundle\Tests\fixtures\ServiceBinding\FooRecursive'),
));
return $definitionComplexTypes;
} }
private function createComplexTypeCollection(array $properties) private function createComplexTypeCollection(array $properties)
@ -277,4 +284,18 @@ class RpcLiteralRequestMessageBinderTest extends \PHPUnit_Framework_TestCase
return array('properties' => $collection); return array('properties' => $collection);
} }
private function getTypeRepository()
{
$typeRepository = new TypeRepository();
$typeRepository->addXmlNamespace('xsd', 'http://www.w3.org/2001/XMLSchema');
$typeRepository->addType('string', 'xsd:string');
$typeRepository->addType('boolean', 'xsd:boolean');
$typeRepository->addType('int', 'xsd:int');
$typeRepository->addType('float', 'xsd:float');
$typeRepository->addType('date', 'xsd:date');
$typeRepository->addType('dateTime', 'xsd:dateTime');
return $typeRepository;
}
} }

View File

@ -23,6 +23,8 @@ class SoapRequestTest extends \PHPUnit_Framework_TestCase
{ {
public function testMtomMessage() public function testMtomMessage()
{ {
$this->markTestSkipped('Skip because I\'m not sure that SoapRequest is used in a HTTP Request process.');
$content = $this->loadRequestContentFixture('mtom/simple.txt'); $content = $this->loadRequestContentFixture('mtom/simple.txt');
$request = new SoapRequest(array(), array(), array(), array(), array(), array(), $content); $request = new SoapRequest(array(), array(), array(), array(), array(), array(), $content);

View File

@ -37,7 +37,6 @@
"psr-0": { "BeSimple\\SoapBundle": "" } "psr-0": { "BeSimple\\SoapBundle": "" }
}, },
"target-dir": "BeSimple/SoapBundle", "target-dir": "BeSimple/SoapBundle",
"minimum-stability": "dev",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "0.2-dev" "dev-master": "0.2-dev"

View File

@ -81,8 +81,13 @@ class Curl
curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT, $options['connection_timeout']); curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT, $options['connection_timeout']);
} }
if (isset($options['proxy_host'])) { if (isset($options['proxy_host'])) {
$port = isset($options['proxy_port']) ? $options['proxy_port'] : 8080; if (false !== $options['proxy_host']) {
curl_setopt($this->ch, CURLOPT_PROXY, $options['proxy_host'] . ':' . $port); $proxyHost = $options['proxy_host'].(isset($options['proxy_port']) ? $options['proxy_port'] : 8080);
} else {
$proxyHost = false;
}
curl_setopt($this->ch, CURLOPT_PROXY, $proxyHost);
} }
if (isset($options['proxy_user'])) { if (isset($options['proxy_user'])) {
curl_setopt($this->ch, CURLOPT_PROXYUSERPWD, $options['proxy_user'] . ':' . $options['proxy_password']); curl_setopt($this->ch, CURLOPT_PROXYUSERPWD, $options['proxy_user'] . ':' . $options['proxy_password']);
@ -321,4 +326,4 @@ class Curl
return trim(array_pop($matches)); return trim(array_pop($matches));
} }
} }

View File

@ -21,7 +21,9 @@ class CurlTest extends AbstractWebserverTest
{ {
public function testExec() public function testExec()
{ {
$curl = new Curl(); $curl = new Curl(array(
'proxy_host' => false,
));
$this->assertTrue($curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT))); $this->assertTrue($curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT)));
$this->assertTrue($curl->exec(sprintf('http://localhost:%d/404.txt', WEBSERVER_PORT))); $this->assertTrue($curl->exec(sprintf('http://localhost:%d/404.txt', WEBSERVER_PORT)));
@ -29,7 +31,9 @@ class CurlTest extends AbstractWebserverTest
public function testGetErrorMessage() public function testGetErrorMessage()
{ {
$curl = new Curl(); $curl = new Curl(array(
'proxy_host' => false,
));
$curl->exec('http://unknown/curl.txt'); $curl->exec('http://unknown/curl.txt');
$this->assertEquals('Could not connect to host', $curl->getErrorMessage()); $this->assertEquals('Could not connect to host', $curl->getErrorMessage());
@ -43,7 +47,9 @@ class CurlTest extends AbstractWebserverTest
public function testGetRequestHeaders() public function testGetRequestHeaders()
{ {
$curl = new Curl(); $curl = new Curl(array(
'proxy_host' => false,
));
$curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT)); $curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT));
$this->assertEquals(132 + self::$websererPortLength, strlen($curl->getRequestHeaders())); $this->assertEquals(132 + self::$websererPortLength, strlen($curl->getRequestHeaders()));
@ -54,7 +60,9 @@ class CurlTest extends AbstractWebserverTest
public function testGetResponse() public function testGetResponse()
{ {
$curl = new Curl(); $curl = new Curl(array(
'proxy_host' => false,
));
$curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT)); $curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT));
$this->assertSame('OK', $curl->getResponseStatusMessage()); $this->assertSame('OK', $curl->getResponseStatusMessage());

View File

@ -14,13 +14,13 @@ $options = array(
'cache_wsdl' => WSDL_CACHE_NONE, 'cache_wsdl' => WSDL_CACHE_NONE,
'classmap' => array( 'classmap' => array(
'base64Binary' => 'BeSimple\SoapClient\Tests\ServerInterop\Fixtures\base64Binary', 'base64Binary' => 'BeSimple\SoapClient\Tests\ServerInterop\Fixtures\base64Binary',
'AttachmentRequest' => 'BeSimple\SoapClient\Tests\ServerInterop\Fixtures\AttachmentRequest', 'AttachmentType' => 'BeSimple\SoapClient\Tests\ServerInterop\Fixtures\AttachmentRequest',
), ),
); );
class Mtom class Mtom
{ {
public function attachment(AttachmentRequest $attachment) public function attachment(Fixtures\AttachmentRequest $attachment)
{ {
$b64 = $attachment->binaryData; $b64 = $attachment->binaryData;

View File

@ -42,6 +42,8 @@ class SwaServerInteropTest extends TestCase
$result = $sc->downloadFile($download); $result = $sc->downloadFile($download);
$this->assertEquals($upload->data, $result->data); $this->assertEquals($upload->data, $result->data);
unlink(__DIR__.'/../ServerInterop/'.$download->name);
} }
public function testUploadDownloadImage() public function testUploadDownloadImage()
@ -60,5 +62,7 @@ class SwaServerInteropTest extends TestCase
$result = $sc->downloadFile($download); $result = $sc->downloadFile($download);
$this->assertEquals($upload->data, $result->data); $this->assertEquals($upload->data, $result->data);
unlink(__DIR__.'/../ServerInterop/'.$download->name);
} }
} }

View File

@ -41,7 +41,9 @@ class WsdlDownloaderTest extends AbstractWebserverTest
Cache::setDirectory($wsdlCacheUrl); Cache::setDirectory($wsdlCacheUrl);
$cacheDirForRegExp = preg_quote($wsdlCacheUrl, '#'); $cacheDirForRegExp = preg_quote($wsdlCacheUrl, '#');
$wsdlDownloader = new WsdlDownloader(new Curl()); $wsdlDownloader = new WsdlDownloader(new Curl(array(
'proxy_host' => false,
)));
$this->assertCount(0, $wsdlCacheDir->getChildren()); $this->assertCount(0, $wsdlCacheDir->getChildren());
$cacheFileName = $wsdlDownloader->download($source); $cacheFileName = $wsdlDownloader->download($source);
@ -272,7 +274,7 @@ class WsdlDownloaderTest extends AbstractWebserverTest
$content = file_get_contents(self::$fixturesPath.$file); $content = file_get_contents(self::$fixturesPath.$file);
$content = preg_replace('#'.preg_quote('%location%').'#', sprintf('localhost:%d', WEBSERVER_PORT), $content); $content = preg_replace('#'.preg_quote('%location%').'#', sprintf('localhost:%d', WEBSERVER_PORT), $content);
self::$filesystem->dumpFile(self::$fixturesPath.'build_include'.DIRECTORY_SEPARATOR.pathinfo($file, PATHINFO_BASENAME), $content); file_put_contents(self::$fixturesPath.'build_include'.DIRECTORY_SEPARATOR.pathinfo($file, PATHINFO_BASENAME), $content);
} }
} }

View File

@ -23,12 +23,12 @@ if [ ! -f "$DIR/$ZIP_RAMPART" ]; then
curl -O -s $PATH_RAMPART curl -O -s $PATH_RAMPART
fi fi
unzip -qq "$DIR/$ZIP_AXIS" unzip -o -qq "$DIR/$ZIP_AXIS"
AXIS_DIR=$DIR/axis2-$VERSION_AXIS AXIS_DIR=$DIR/axis2-$VERSION_AXIS
unzip -qq -j "$DIR/$ZIP_RAMPART" '*/lib/*.jar' -d $AXIS_DIR/lib unzip -o -qq -j "$DIR/$ZIP_RAMPART" '*/lib/*.jar' -d $AXIS_DIR/lib
unzip -qq -j "$DIR/$ZIP_RAMPART" '*/modules/*.mar' -d $AXIS_DIR/repository/modules unzip -o -qq -j "$DIR/$ZIP_RAMPART" '*/modules/*.mar' -d $AXIS_DIR/repository/modules
cp -r $DIR/../AxisInterop/axis_services/* $AXIS_DIR/repository/services cp -r $DIR/../AxisInterop/axis_services/* $AXIS_DIR/repository/services

View File

@ -27,15 +27,14 @@
"ass/xmlsecurity": "~1.0" "ass/xmlsecurity": "~1.0"
}, },
"require-dev": { "require-dev": {
"mikey179/vfsStream": "dev-master", "mikey179/vfsStream": "~1.0",
"symfony/filesystem": "~2.3", "symfony/filesystem": "~2.0",
"symfony/process": "~2.3" "symfony/process": "~2.3"
}, },
"autoload": { "autoload": {
"psr-0": { "BeSimple\\SoapClient": "" } "psr-0": { "BeSimple\\SoapClient": "" }
}, },
"target-dir": "BeSimple/SoapClient", "target-dir": "BeSimple/SoapClient",
"minimum-stability": "dev",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "0.2-dev" "dev-master": "0.2-dev"

View File

@ -26,13 +26,12 @@
}, },
"require-dev": { "require-dev": {
"ext-mcrypt": "*", "ext-mcrypt": "*",
"mikey179/vfsStream": "dev-master" "mikey179/vfsStream": "~1.0"
}, },
"autoload": { "autoload": {
"psr-0": { "BeSimple\\SoapCommon": "" } "psr-0": { "BeSimple\\SoapCommon": "" }
}, },
"target-dir": "BeSimple/SoapCommon", "target-dir": "BeSimple/SoapCommon",
"minimum-stability": "dev",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "0.2-dev" "dev-master": "0.2-dev"

View File

@ -29,7 +29,6 @@
"psr-0": { "BeSimple\\SoapServer": "" } "psr-0": { "BeSimple\\SoapServer": "" }
}, },
"target-dir": "BeSimple/SoapServer", "target-dir": "BeSimple/SoapServer",
"minimum-stability": "dev",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "0.2-dev" "dev-master": "0.2-dev"

View File

@ -22,7 +22,6 @@
"psr-0": { "BeSimple\\SoapWsdl": "" } "psr-0": { "BeSimple\\SoapWsdl": "" }
}, },
"target-dir": "BeSimple/SoapWsdl", "target-dir": "BeSimple/SoapWsdl",
"minimum-stability": "dev",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "0.2-dev" "dev-master": "0.2-dev"