Reorganized directories structure

This commit is contained in:
Francis Besset 2013-07-19 11:28:23 +02:00
parent 9328c98935
commit b78bf408bf
136 changed files with 179 additions and 365 deletions

3
.gitignore vendored
View File

@ -0,0 +1,3 @@
/vendor/
composer.lock
phpunit.xml

10
.travis.yml Normal file
View File

@ -0,0 +1,10 @@
language: php
php:
- 5.3
- 5.4
- 5.5
before_script:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev --prefer-source

45
composer.json Normal file
View File

@ -0,0 +1,45 @@
{
"name": "besimple/soap",
"type": "library",
"description": "Build and consume SOAP and WSDL based web services",
"keywords": ["soap"],
"homepage": "http://besim.pl",
"license": "MIT",
"authors": [
{
"name": "Francis Besset",
"email": "francis.besset@gmail.com"
},
{
"name": "Christian Kerl",
"email": "christian-kerl@web.de"
},
{
"name": "Andreas Schamberger",
"email": "mail@andreass.net"
}
],
"require": {
"php": ">=5.3.0",
"ext-soap": "*",
"ext-curl": "*",
"ass/xmlsecurity": "dev-master",
"symfony/http-foundation": ">=2.0,<2.4-dev",
"zendframework/zend-mail": "2.1.*",
"zendframework/zend-mime": "2.1.*",
"zendframework/zend-soap": "2.1.*"
},
"replace": {
"besimple/soap-bundle": "self.version",
"besimple/soap-client": "self.version",
"besimple/soap-common": "self.version",
"besimple/soap-server": "self.version"
},
"require-dev": {
"mikey179/vfsStream": "dev-master"
},
"autoload": {
"psr-0": { "BeSimple\\": "src/" }
},
"minimum-stability": "dev"
}

30
phpunit.xml.dist Normal file
View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
bootstrap="vendor/autoload.php"
>
<testsuites>
<testsuite name="BeSimpleSoap Test Suite">
<directory>./src/BeSimple/*/Tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>./src/BeSimple/</directory>
<exclude>
<directory>./src/BeSimple/*/Tests</directory>
<directory>./src/BeSimple/*/Resources</directory>
</exclude>
</whitelist>
</filter>
</phpunit>

View File

@ -1,4 +1,3 @@
build/* vendor/
composer.lock
phpunit.xml phpunit.xml
vendor
*.swp

View File

@ -1,17 +0,0 @@
language: php
php:
- 5.3
- 5.4
- 5.5
matrix:
allow_failures:
- php: 5.5
before_script:
- composer self-update
- composer install --dev --prefer-source
notifications:
email: francis.besset@gmail.com

View File

@ -21,6 +21,7 @@
], ],
"require": { "require": {
"php": ">=5.3.0", "php": ">=5.3.0",
"ext-soap": "*",
"besimple/soap-common": "dev-master", "besimple/soap-common": "dev-master",
"ass/xmlsecurity": "dev-master", "ass/xmlsecurity": "dev-master",
"zendframework/zend-soap": "2.1.*", "zendframework/zend-soap": "2.1.*",
@ -33,9 +34,8 @@
"besimple/soap-server": "dev-master" "besimple/soap-server": "dev-master"
}, },
"autoload": { "autoload": {
"psr-0": { "psr-0": { "BeSimple\\SoapBundle": "" }
"BeSimple\\SoapBundle": ""
}
}, },
"target-dir": "BeSimple/SoapBundle" "target-dir": "BeSimple/SoapBundle",
"minimum-stability": "dev"
} }

View File

@ -13,24 +13,17 @@
> >
<testsuites> <testsuites>
<testsuite name="SoapBundle Test Suite"> <testsuite name="BeSimple SoapBundle Test Suite">
<directory>./Tests</directory> <directory>./Tests</directory>
</testsuite> </testsuite>
</testsuites> </testsuites>
<!--
<logging>
<log type="coverage-html" target="build/coverage" />
</logging>
-->
<filter> <filter>
<whitelist> <whitelist>
<directory>.</directory> <directory>./</directory>
<exclude> <exclude>
<directory>Tests</directory> <directory>./Tests/</directory>
<directory>vendor</directory> <directory>./vendor/</directory>
<file>vendors.php</file>
</exclude> </exclude>
</whitelist> </whitelist>
</filter> </filter>

View File

@ -1,41 +0,0 @@
#!/usr/bin/env php
<?php
/*
* This file is part of the BeSimpleSoapBundle.
*
* (c) Christian Kerl <christian-kerl@web.de>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
/*
CAUTION: This file installs the dependencies needed to run the BeSimpleSoapBundle test suite.
https://github.com/BeSimple/BeSimpleSoapBundle
*/
if (!is_dir($vendorDir = dirname(__FILE__).'/vendor')) {
mkdir($vendorDir, 0777, true);
}
$deps = array(
array('symfony', 'http://github.com/symfony/symfony.git', 'origin/HEAD'),
array('zend-framework/library/Zend/Soap', 'http://github.com/BeSimple/zend-soap.git', 'origin/HEAD'),
array('zend-framework/library/Zend/Mime', 'http://github.com/BeSimple/zend-mime.git', 'origin/HEAD'),
);
foreach ($deps as $dep) {
list($name, $url, $rev) = $dep;
echo "> Installing/Updating $name\n";
$installDir = $vendorDir.'/'.$name;
if (!is_dir($installDir)) {
system(sprintf('git clone %s %s', escapeshellarg($url), escapeshellarg($installDir)));
}
system(sprintf('cd %s && git fetch origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)));
}

View File

@ -1,5 +1,3 @@
vendor vendor/
/phpunit.xml composer.lock
.buildpath phpunit.xml
.project
.settings

View File

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View File

@ -10,7 +10,7 @@
* with this source code in the file LICENSE. * with this source code in the file LICENSE.
*/ */
namespace BeSimple\SoapClient; namespace BeSimple\SoapClient\Tests;
use BeSimple\SoapClient\Curl; use BeSimple\SoapClient\Curl;
@ -23,7 +23,9 @@ class CurlTest extends \PHPUnit_Framework_TestCase
protected function startPhpWebserver() protected function startPhpWebserver()
{ {
$dir = __DIR__.DIRECTORY_SEPARATOR.'Fixtures'; $this->markTestSkipped('Start a local webserver is not the best practice');
$dir = __DIR__.DIRECTORY_SEPARATOR.'Fixtures';
if ('Windows' == substr(php_uname('s'), 0, 7)) { if ('Windows' == substr(php_uname('s'), 0, 7)) {
$powershellCommand = "\$app = start-process php.exe -ArgumentList '-S localhost:8000 -t ".$dir."' -WindowStyle 'Hidden' -passthru; Echo \$app.Id;"; $powershellCommand = "\$app = start-process php.exe -ArgumentList '-S localhost:8000 -t ".$dir."' -WindowStyle 'Hidden' -passthru; Echo \$app.Id;";
$shellCommand = 'powershell -command "& {'.$powershellCommand.'}"'; $shellCommand = 'powershell -command "& {'.$powershellCommand.'}"';

View File

@ -10,7 +10,7 @@
* with this source code in the file LICENSE. * with this source code in the file LICENSE.
*/ */
namespace BeSimple\Tests\SoapCommon\Soap; namespace BeSimple\SoapClient\Tests;
use BeSimple\SoapClient\SoapClientBuilder; use BeSimple\SoapClient\SoapClientBuilder;

View File

@ -10,7 +10,7 @@
* with this source code in the file LICENSE. * with this source code in the file LICENSE.
*/ */
namespace BeSimple\SoapClient; namespace BeSimple\SoapClient\Tests;
use BeSimple\SoapClient\WsdlDownloader; use BeSimple\SoapClient\WsdlDownloader;
use BeSimple\SoapClient\Curl; use BeSimple\SoapClient\Curl;
@ -24,6 +24,8 @@ class WsdlDownloaderTest extends \PHPUnit_Framework_TestCase
protected function startPhpWebserver() protected function startPhpWebserver()
{ {
$this->markTestSkipped('Start a local webserver is not the best practice');
$dir = __DIR__.DIRECTORY_SEPARATOR.'Fixtures'; $dir = __DIR__.DIRECTORY_SEPARATOR.'Fixtures';
if ('Windows' == substr(php_uname('s'), 0, 7)) { if ('Windows' == substr(php_uname('s'), 0, 7)) {
$powershellCommand = "\$app = start-process php.exe -ArgumentList '-S localhost:8000 -t ".$dir."' -WindowStyle 'Hidden' -passthru; Echo \$app.Id;"; $powershellCommand = "\$app = start-process php.exe -ArgumentList '-S localhost:8000 -t ".$dir."' -WindowStyle 'Hidden' -passthru; Echo \$app.Id;";

View File

@ -21,13 +21,14 @@
], ],
"require": { "require": {
"php": ">=5.3.0", "php": ">=5.3.0",
"ext-soap": "*",
"ext-curl": "*",
"besimple/soap-common": "dev-master", "besimple/soap-common": "dev-master",
"ass/xmlsecurity": "dev-master" "ass/xmlsecurity": "dev-master"
}, },
"autoload": { "autoload": {
"psr-0": { "psr-0": { "BeSimple\\SoapClient": "" }
"BeSimple\\SoapClient": "BeSimple/SoapClient/src/"
}
}, },
"target-dir": "BeSimple/SoapClient" "target-dir": "BeSimple/SoapClient",
"minimum-stability": "dev"
} }

View File

@ -9,23 +9,21 @@
processIsolation="false" processIsolation="false"
stopOnFailure="false" stopOnFailure="false"
syntaxCheck="false" syntaxCheck="false"
bootstrap="tests/bootstrap.php" bootstrap="vendor/autoload.php"
> >
<testsuites> <testsuites>
<testsuite name="BeSimple\SoapClient Test Suite"> <testsuite name="BeSimple SoapClient Test Suite">
<directory>./tests/BeSimple/</directory> <directory>./Tests/</directory>
</testsuite> </testsuite>
</testsuites> </testsuites>
<groups>
<exclude>
<group>benchmark</group>
</exclude>
</groups>
<filter> <filter>
<whitelist> <whitelist>
<directory>./src/BeSimple/</directory> <directory>./</directory>
<exclude>
<directory>./Tests/</directory>
<directory>./vendor/</directory>
</exclude>
</whitelist> </whitelist>
</filter> </filter>
</phpunit> </phpunit>

View File

@ -1,36 +0,0 @@
<?php
error_reporting(E_ALL | E_STRICT);
// register silently failing autoloader
spl_autoload_register(function($class) {
if (0 === strpos($class, 'BeSimple\Tests\\')) {
$path = __DIR__.'/../'.strtr($class, '\\', '/').'.php';
if (file_exists($path) && is_readable($path)) {
require_once $path;
return true;
}
} elseif (0 === strpos($class, 'BeSimple\SoapClient\\')) {
$path = __DIR__.'/../src/'.($class = strtr($class, '\\', '/')).'.php';
if (file_exists($path) && is_readable($path)) {
require_once $path;
return true;
}
} elseif (0 === strpos($class, 'ass\XmlSecurity\\')) {
$path = __DIR__.'/../vendor/XmlSecurity/src/'.strtr($class, '\\', '/').'.php';
if (file_exists($path) && is_readable($path)) {
require_once $path;
return true;
}
} elseif (0 === strpos($class, 'BeSimple\SoapCommon\\')) {
$path = __DIR__.'/../vendor/besimple-soapcommon/src/'.($class = strtr($class, '\\', '/')).'.php';
if (file_exists($path) && is_readable($path)) {
require_once $path;
return true;
}
}
});

View File

@ -1,42 +0,0 @@
#!/usr/bin/env php
<?php
/*
* This file is part of the BeSimpleSoapClient.
*
* (c) Christian Kerl <christian-kerl@web.de>
* (c) Francis Besset <francis.besset@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
/*
CAUTION: This file installs the dependencies needed to run the BeSimpleSoapClient test suite.
https://github.com/BeSimple/BeSimpleSoapClient
*/
if (!is_dir($vendorDir = dirname(__FILE__).'/vendor')) {
mkdir($vendorDir, 0777, true);
}
$deps = array(
array('besimple-soapcommon', 'http://github.com/BeSimple/BeSimpleSoapCommon.git', 'origin/HEAD'),
array('XmlSecurity', 'https://github.com/aschamberger/XmlSecurity.git', 'origin/HEAD'),
);
foreach ($deps as $dep) {
list($name, $url, $rev) = $dep;
echo "> Installing/Updating $name\n";
$installDir = $vendorDir.'/'.$name;
if (!is_dir($installDir)) {
system(sprintf('git clone %s %s', escapeshellarg($url), escapeshellarg($installDir)));
}
system(sprintf('cd %s && git fetch origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)));
}

View File

@ -1,5 +1,3 @@
vendor vendor/
/phpunit.xml composer.lock
.buildpath phpunit.xml
.project
.settings

View File

@ -1,7 +0,0 @@
language: php
php:
- 5.3
- 5.4
before_script: composer install --dev --prefer-source

View File

@ -10,14 +10,14 @@
* with this source code in the file LICENSE. * with this source code in the file LICENSE.
*/ */
namespace BeSimple\Tests\SoapCommon\Soap; namespace BeSimple\SoapCommon\Tests;
use BeSimple\SoapCommon\Cache; use BeSimple\SoapCommon\Cache;
use BeSimple\SoapCommon\Classmap; use BeSimple\SoapCommon\Classmap;
use BeSimple\SoapCommon\Converter\DateTimeTypeConverter; use BeSimple\SoapCommon\Converter\DateTimeTypeConverter;
use BeSimple\SoapCommon\Converter\DateTypeConverter; use BeSimple\SoapCommon\Converter\DateTypeConverter;
use BeSimple\SoapCommon\Converter\TypeConverterCollection; use BeSimple\SoapCommon\Converter\TypeConverterCollection;
use BeSimple\Tests\SoapCommon\Fixtures\SoapBuilder; use BeSimple\SoapCommon\Tests\Fixtures\SoapBuilder;
class AbstractSoapBuilderTest extends \PHPUnit_Framework_TestCase class AbstractSoapBuilderTest extends \PHPUnit_Framework_TestCase
{ {
@ -194,7 +194,7 @@ class AbstractSoapBuilderTest extends \PHPUnit_Framework_TestCase
{ {
$builder = SoapBuilder::createWithDefaults(); $builder = SoapBuilder::createWithDefaults();
$this->assertInstanceOf('BeSimple\Tests\SoapCommon\Fixtures\SoapBuilder', $builder); $this->assertInstanceOf('BeSimple\SoapCommon\Tests\Fixtures\SoapBuilder', $builder);
$this->assertEquals($this->mergeOptions(array('soap_version' => SOAP_1_2, 'encoding' => 'UTF-8', 'features' => SOAP_SINGLE_ELEMENT_ARRAYS)), $builder->getSoapOptions()); $this->assertEquals($this->mergeOptions(array('soap_version' => SOAP_1_2, 'encoding' => 'UTF-8', 'features' => SOAP_SINGLE_ELEMENT_ARRAYS)), $builder->getSoapOptions());
} }

View File

@ -10,7 +10,7 @@
* with this source code in the file LICENSE. * with this source code in the file LICENSE.
*/ */
namespace BeSimple\Tests\SoapCommon\Soap; namespace BeSimple\SoapCommon\Tests;
use BeSimple\SoapCommon\Cache; use BeSimple\SoapCommon\Cache;
use org\bovigo\vfs\vfsStream; use org\bovigo\vfs\vfsStream;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace BeSimple\Tests\SoapCommon\Fixtures; namespace BeSimple\SoapCommon\Tests\Fixtures;
use BeSimple\SoapCommon\Mime\PartHeader; use BeSimple\SoapCommon\Mime\PartHeader;

View File

@ -1,6 +1,6 @@
<?php <?php
namespace BeSimple\Tests\SoapCommon\Fixtures; namespace BeSimple\SoapCommon\Tests\Fixtures;
use BeSimple\SoapCommon\AbstractSoapBuilder; use BeSimple\SoapCommon\AbstractSoapBuilder;

Some files were not shown because too many files have changed in this diff Show More