Added scripts to run phpunit tests

This commit is contained in:
Francis Besset
2011-07-14 17:41:28 +02:00
parent ab1d720e13
commit 7ddf05cec1
5 changed files with 93 additions and 1 deletions

View File

@ -8,7 +8,7 @@
* with this source code in the file LICENSE.
*/
namespace Bundle\WebServiceBundle\Tests;
namespace Bundle\WebServiceBundle\Tests\Soap;
use Bundle\WebServiceBundle\Soap\SoapRequest;

25
Tests/bootstrap.php Normal file
View File

@ -0,0 +1,25 @@
<?php
require_once $_SERVER['SYMFONY'].'/Symfony/Component/ClassLoader/UniversalClassLoader.php';
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespace('Symfony', $_SERVER['SYMFONY']);
$loader->registerNamespace('Zend', $_SERVER['ZEND']);
$loader->register();
spl_autoload_register(function($class) {
//if (0 === strpos($class, 'BeSimple\\SoapBundle\\')) {
if (0 === strpos($class, 'Bundle\\WebServiceBundle\\')) {
$path = __DIR__.'/../'.implode('/', array_slice(explode('\\', $class), 2)).'.php';
if (file_exists($path)) {
require_once $path;
return true;
}
return false;
}
});