summaryrefslogtreecommitdiff
path: root/server/vendor/php-opencloud/common/tests/integration/Runner.php
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-28 12:17:43 +0200
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-28 12:17:43 +0200
commit53f65de9d4163c9c095f2b8e87baca648c3645bd (patch)
tree37f167f38b25aa50bd7dd1429438c0245a280a28 /server/vendor/php-opencloud/common/tests/integration/Runner.php
parent60cfe3ebc039df8d6a468a43a59e7fd8c2a16956 (diff)
parent804fa322d841d73ee7592885ec500dc94e91b9e6 (diff)
Test
Diffstat (limited to 'server/vendor/php-opencloud/common/tests/integration/Runner.php')
-rwxr-xr-xserver/vendor/php-opencloud/common/tests/integration/Runner.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/server/vendor/php-opencloud/common/tests/integration/Runner.php b/server/vendor/php-opencloud/common/tests/integration/Runner.php
index 98d094c..b1003a2 100755
--- a/server/vendor/php-opencloud/common/tests/integration/Runner.php
+++ b/server/vendor/php-opencloud/common/tests/integration/Runner.php
@@ -1,16 +1,19 @@
<?php
-namespace OpenCloud\integration;
+namespace OpenCloud\Integration;
class Runner
{
private $basePath;
private $logger;
private $services = [];
+ private $namespace;
- public function __construct($basePath)
+ public function __construct($basePath, $testNamespace)
{
$this->basePath = $basePath;
+ $this->namespace = $testNamespace;
+
$this->logger = new DefaultLogger();
$this->assembleServicesFromSamples();
}
@@ -73,15 +76,14 @@ class Runner
*/
private function getTest($serviceName, $version, $verbosity)
{
- $namespace = (new \ReflectionClass($this))->getNamespaceName();
- $className = sprintf("%s\\%s\\%sTest", $namespace, Utils::toCamelCase($serviceName), ucfirst($version));
+ $className = sprintf("%s\\%s\\%sTest", $this->namespace, Utils::toCamelCase($serviceName), ucfirst($version));
if (!class_exists($className)) {
throw new \RuntimeException(sprintf("%s does not exist", $className));
}
$basePath = $this->basePath . DIRECTORY_SEPARATOR . $serviceName . DIRECTORY_SEPARATOR . $version;
- $smClass = sprintf("%s\\SampleManager", $namespace);
+ $smClass = sprintf("%s\\SampleManager", $this->namespace);
$class = new $className($this->logger, new $smClass($basePath, $verbosity));
if (!($class instanceof TestInterface)) {