Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/config_test.php2
-rw-r--r--tests/modules/Url.test.php49
2 files changed, 51 insertions, 0 deletions
diff --git a/tests/config_test.php b/tests/config_test.php
index ab651623d2..4bbe899e56 100755
--- a/tests/config_test.php
+++ b/tests/config_test.php
@@ -16,6 +16,8 @@ if(!defined('PIWIK_INCLUDE_PATH'))
set_include_path(PATH_TEST_TO_ROOT .'/'
. PATH_SEPARATOR . getcwd()
. PATH_SEPARATOR . getcwd() . '/../'
+ . PATH_SEPARATOR . PATH_TEST_TO_ROOT2
+ . PATH_SEPARATOR . PATH_TEST_TO_ROOT
. PATH_SEPARATOR . PATH_TEST_TO_ROOT . '/libs/'
. PATH_SEPARATOR . getcwd() . '/../../libs/'
. PATH_SEPARATOR . getcwd() . '/../libs/'
diff --git a/tests/modules/Url.test.php b/tests/modules/Url.test.php
new file mode 100644
index 0000000000..92056f33da
--- /dev/null
+++ b/tests/modules/Url.test.php
@@ -0,0 +1,49 @@
+<?php
+if(!defined("PATH_TEST_TO_ROOT")) {
+ define('PATH_TEST_TO_ROOT', '..');
+}
+if(!defined('CONFIG_TEST_INCLUDED'))
+{
+ require_once PATH_TEST_TO_ROOT ."/../tests/config_test.php";
+}
+
+require_once "modules/Url.php";
+
+class Test_Piwik_Url extends UnitTestCase
+{
+ function __construct( $title = '')
+ {
+ parent::__construct( $title );
+ }
+
+ public function setUp()
+ {
+ }
+
+ public function tearDown()
+ {
+ }
+
+
+ /**
+ * display output of all methods
+ */
+ public function test_allMethods()
+ {
+ print("<br>\nPiwik_Url::getCurrentQueryStringWithParametersModified() "
+ . Piwik_Url::getCurrentQueryStringWithParametersModified(array()));
+ print("<br>\nPiwik_Url::getCurrentUrl() "
+ . Piwik_Url::getCurrentUrl());
+ print("<br>\nPiwik_Url::getCurrentUrlWithoutQueryString() "
+ . Piwik_Url::getCurrentUrlWithoutQueryString());
+ print("<br>\nPiwik_Url::getCurrentUrlWithoutFileName() "
+ . Piwik_Url::getCurrentUrlWithoutFileName());
+ print("<br>\nPiwik_Url::getCurrentScriptName() "
+ . Piwik_Url::getCurrentScriptName());
+ print("<br>\nPiwik_Url::getCurrentHost() "
+ . Piwik_Url::getCurrentHost());
+ print("<br>\nPiwik_Url::getCurrentQueryString() "
+ . Piwik_Url::getCurrentQueryString());
+ }
+}
+