summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/config.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/config.php')
-rw-r--r--tests/FunctionalTests/config.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/FunctionalTests/config.php b/tests/FunctionalTests/config.php
index 99644888..73491c6e 100644
--- a/tests/FunctionalTests/config.php
+++ b/tests/FunctionalTests/config.php
@@ -90,15 +90,12 @@ class PradoApplicationTester extends TApplication
protected function getTestServiceParameter($file)
{
- $file = realpath($file);
- $base = realpath($this->testConfig->tests_directory().'/pages/');
+ $file = strtr(realpath($file),'\\','/');
+ $base = strtr(realpath($this->testConfig->tests_directory().'/pages/'),'\\','/');
$search = array($base, '.php');
$replace = array('', '');
$pagePath = str_replace($search, $replace, $file);
- $separator = array("/", "\\");
- if(in_array($pagePath[0], $separator))
- $pagePath = substr($pagePath, 1);
- return str_replace($separator, array('.','.'), $pagePath);
+ return strtr(trim($pagePath,'/'),'/','.');
}
}