From 2f6209e33a12d60c84a52cf969e7d13a62280d52 Mon Sep 17 00:00:00 2001 From: Lukas Kahwe Smith Date: Mon, 25 Apr 2011 02:02:36 +0200 Subject: [PATCH] added a phpunit.xml.dist and bootstrap --- Tests/bootstrap.php | 19 +++++++++++++++++++ phpunit.xml.dist | 24 ++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 Tests/bootstrap.php create mode 100644 phpunit.xml.dist diff --git a/Tests/bootstrap.php b/Tests/bootstrap.php new file mode 100644 index 000000000..fce6039c8 --- /dev/null +++ b/Tests/bootstrap.php @@ -0,0 +1,19 @@ +registerNamespace('Symfony', $_SERVER['SYMFONY']); +$loader->registerNamespace('Doctrine', $_SERVER['DOCTRINE']); +$loader->register(); + +spl_autoload_register(function($class) +{ + if (0 === strpos($class, 'FOS\\RestBundle\\')) { + $path = implode('/', array_slice(explode('\\', $class), 2)).'.php'; + require_once __DIR__.'/../'.$path; + return true; + } +}); diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 000000000..75ee21561 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,24 @@ + + + + + + + + + + + ./Tests + + + + + + ./ + + ./Resources + ./Tests + + + +