diff options
author | matthieu_ <matthieu_@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2007-09-18 14:36:04 +0400 |
---|---|---|
committer | matthieu_ <matthieu_@59fd770c-687e-43c8-a1e3-f5a4ff64c105> | 2007-09-18 14:36:04 +0400 |
commit | 821930515aa95c4ca1367ab33879e6208d6d7db7 (patch) | |
tree | a388ea795d1a4a0f49781283283ad8152503f8aa /tests | |
parent | 5f80dfd757c207c0963cf790fe61fa220dcc1382 (diff) |
Added test for the URL which seems buggy on windows
Fixed some bugs in Opera (still some bugs remaining in the Action table, see TODO)
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/config_test.php | 2 | ||||
-rw-r--r-- | tests/modules/Url.test.php | 49 |
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()); + } +} + |