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

View File

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

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.
*/
namespace BeSimple\Tests\SoapCommon\Soap;
namespace BeSimple\SoapCommon\Tests;
use BeSimple\SoapCommon\Cache;
use BeSimple\SoapCommon\Classmap;
use BeSimple\SoapCommon\Converter\DateTimeTypeConverter;
use BeSimple\SoapCommon\Converter\DateTypeConverter;
use BeSimple\SoapCommon\Converter\TypeConverterCollection;
use BeSimple\Tests\SoapCommon\Fixtures\SoapBuilder;
use BeSimple\SoapCommon\Tests\Fixtures\SoapBuilder;
class AbstractSoapBuilderTest extends \PHPUnit_Framework_TestCase
{
@ -194,7 +194,7 @@ class AbstractSoapBuilderTest extends \PHPUnit_Framework_TestCase
{
$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());
}
@ -208,4 +208,4 @@ class AbstractSoapBuilderTest extends \PHPUnit_Framework_TestCase
{
return array_merge($this->defaultOptions, $options);
}
}
}

View File

@ -10,7 +10,7 @@
* with this source code in the file LICENSE.
*/
namespace BeSimple\Tests\SoapCommon\Soap;
namespace BeSimple\SoapCommon\Tests;
use BeSimple\SoapCommon\Cache;
use org\bovigo\vfs\vfsStream;
@ -91,4 +91,4 @@ class SoapRequestTest extends \PHPUnit_Framework_TestCase
ini_restore('soap.wsdl_cache_ttl');
ini_restore('soap.wsdl_cache_limit');
}
}
}

View File

@ -1,9 +1,9 @@
<?php
namespace BeSimple\Tests\SoapCommon\Fixtures;
namespace BeSimple\SoapCommon\Tests\Fixtures;
use BeSimple\SoapCommon\Mime\PartHeader;
class MimePartHeader extends PartHeader
{
}
}

View File

@ -1,9 +1,9 @@
<?php
namespace BeSimple\Tests\SoapCommon\Fixtures;
namespace BeSimple\SoapCommon\Tests\Fixtures;
use BeSimple\SoapCommon\AbstractSoapBuilder;
class SoapBuilder extends AbstractSoapBuilder
{
}
}

View File

@ -10,7 +10,7 @@
* with this source code in the file LICENSE.
*/
namespace BeSimple\Tests\SoapCommon\Soap;
namespace BeSimple\SoapCommon\Tests;
use BeSimple\SoapCommon\Mime\MultiPart;
use BeSimple\SoapCommon\Mime\Part;
@ -141,4 +141,4 @@ class MultiPartTest extends \PHPUnit_Framework_TestCase
);
$this->assertEquals($withMain, $mp->getParts(true));
}
}
}

View File

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

View File

@ -10,10 +10,10 @@
* with this source code in the file LICENSE.
*/
namespace BeSimple\Tests\SoapCommon\Soap;
namespace BeSimple\SoapCommon\Tests;
use BeSimple\SoapCommon\Mime\PartHeader;
use BeSimple\Tests\SoapCommon\Fixtures\MimePartHeader;
use BeSimple\SoapCommon\Tests\Fixtures\MimePartHeader;
class PartHeaderTest extends \PHPUnit_Framework_TestCase
{
@ -54,4 +54,4 @@ class PartHeaderTest extends \PHPUnit_Framework_TestCase
$ph->setHeader('Content-Type', 'type', 'text/xml');
$this->assertEquals("Content-Type: text/xml; charset=utf-8; type=\"text/xml\"\r\n", $method->invoke($ph));
}
}
}

View File

@ -10,7 +10,7 @@
* with this source code in the file LICENSE.
*/
namespace BeSimple\Tests\SoapCommon\Soap;
namespace BeSimple\SoapCommon\Tests;
use BeSimple\SoapCommon\Mime\Part;
use BeSimple\SoapCommon\Mime\PartHeader;
@ -59,4 +59,4 @@ class PartTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($messagePart, $p->getMessagePart());
}
}
}

View File

@ -10,7 +10,7 @@
* with this source code in the file LICENSE.
*/
namespace BeSimple\Tests\SoapCommon\Soap;
namespace BeSimple\SoapCommon\Tests;
use BeSimple\SoapCommon\WsSecurityKey;
use ass\XmlSecurity\Key as XmlSecurityKey;

View File

@ -10,7 +10,7 @@
* with this source code in the file LICENSE.
*/
namespace BeSimple\Tests\SoapCommon\Soap;
namespace BeSimple\SoapCommon\Tests;
use BeSimple\SoapCommon\WsdlHandler;
@ -45,4 +45,4 @@ class WsdlHandlerTest extends \PHPUnit_Framework_TestCase
$this->assertTrue($wh->isValidMimeTypeType('http://example.com/soapaction', WsdlHandler::BINDING_OPERATION_INPUT, 'ClaimPhoto', 'image/gif'));
$this->assertTrue($wh->isValidMimeTypeType('http://example.com/soapaction', WsdlHandler::BINDING_OPERATION_INPUT, 'ClaimPhoto', 'text/xml'));
}
}
}

View File

@ -21,14 +21,15 @@
],
"require": {
"php": ">=5.3.0",
"ext-soap": "*",
"ass/xmlsecurity": "dev-master"
},
"require-dev": {
"mikey179/vfsStream": "dev-master"
},
"autoload": {
"psr-0": {
"BeSimple\\SoapCommon": "src/"
}
}
"psr-0": { "BeSimple\\SoapCommon": "" }
},
"target-dir": "BeSimple/SoapCommon",
"minimum-stability": "dev"
}

View File

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

View File

@ -1,5 +0,0 @@
<?php
$loader = require __DIR__.'/../vendor/autoload.php';
$loader->add('BeSimple\Tests\SoapCommon\\', __DIR__);

View File

@ -1,42 +0,0 @@
#!/usr/bin/env php
<?php
/*
* This file is part of the BeSimpleSoapCommon.
*
* (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 BeSimpleSoapCommon test suite.
https://github.com/BeSimple/BeSimpleSoapCommon
*/
if (!is_dir($vendorDir = dirname(__FILE__).'/vendor')) {
mkdir($vendorDir, 0777, true);
}
$deps = array(
array('vfsStream', 'https://github.com/mikey179/vfsStream.git', 'RELEASE-0.10.1'),
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)));
}