diff options
author | mattab <matthieu.aubry@gmail.com> | 2015-12-04 06:10:40 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2015-12-04 06:10:40 +0300 |
commit | c11251c1def82c79e6ea608b57dc8898d9ffe60f (patch) | |
tree | 80c51b933481d29e15f9d988511ab1ec0bc56329 | |
parent | 39f479f8c49c2ed71892ec149be51f2d92b663f4 (diff) |
Minor: new test cases
-rw-r--r-- | plugins/Referrers/tests/Integration/Columns/ReferrerTypeTest.php | 6 | ||||
-rw-r--r-- | plugins/SitesManager/tests/Integration/SiteUrlsTest.php | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/Referrers/tests/Integration/Columns/ReferrerTypeTest.php b/plugins/Referrers/tests/Integration/Columns/ReferrerTypeTest.php index c61ae04858..0d5e0a68ca 100644 --- a/plugins/Referrers/tests/Integration/Columns/ReferrerTypeTest.php +++ b/plugins/Referrers/tests/Integration/Columns/ReferrerTypeTest.php @@ -72,6 +72,7 @@ class ReferrerTypeTest extends IntegrationTestCase $url = 'http://piwik.org/foo/bar'; $referrer = 'http://piwik.org'; + // $expectedType, $idSite, $url, $referrerUrl return array( // domain matches but path does not match for idsite1 array(Common::REFERRER_TYPE_WEBSITE, $this->idSite1, $url, $referrer), @@ -86,8 +87,13 @@ class ReferrerTypeTest extends IntegrationTestCase array(Common::REFERRER_TYPE_DIRECT_ENTRY, $this->idSite1, $url, $referrer . '/foo/bar/baz'), array(Common::REFERRER_TYPE_DIRECT_ENTRY, $this->idSite1, $url, $referrer . '/foo/bar/baz/'), array(Common::REFERRER_TYPE_DIRECT_ENTRY, $this->idSite1, $url, $referrer . '/foo/bar/baz?x=5'), + // /not/xyz belongs to different website + array(Common::REFERRER_TYPE_WEBSITE, $this->idSite1, $url, $referrer . '/not/xyz'), + array(Common::REFERRER_TYPE_DIRECT_ENTRY, $this->idSite2, $url, $referrer . '/not/xyz'), + // /foo/bar/baz belongs to different website array(Common::REFERRER_TYPE_WEBSITE, $this->idSite2, $url, $referrer . '/foo/bar/baz'), + // website as it is from different domain anyway array(Common::REFERRER_TYPE_WEBSITE, $this->idSite3, $url, $referrer . '/foo/bar/baz'), diff --git a/plugins/SitesManager/tests/Integration/SiteUrlsTest.php b/plugins/SitesManager/tests/Integration/SiteUrlsTest.php index 894e94fc0f..39d628197e 100644 --- a/plugins/SitesManager/tests/Integration/SiteUrlsTest.php +++ b/plugins/SitesManager/tests/Integration/SiteUrlsTest.php @@ -158,7 +158,7 @@ class SiteUrlsTest extends IntegrationTestCase $urls = array( $idSite => array( - 'http://apache.piwik/test', 'http://apache.piWik', 'http://apache.piwik/foo/bAr/' + 'http://apache.piwik/test', 'http://apache.piWik', 'http://apache.piwik/foo/bAr/', 'http://apache.piwik/Foo/SECOND' ), $idSite2 => array( 'http://apache.piwik/test/', 'http://example.oRg', 'http://apache.piwik/foo/secOnd' @@ -172,7 +172,7 @@ class SiteUrlsTest extends IntegrationTestCase $expected = array( 'apache.piwik' => array( - '/foo/second/' => array($idSite2), + '/foo/second/' => array($idSite, $idSite2), '/foo/bar/' => array($idSite), '/third/' => array($idSite3), '/test/' => array($idSite, $idSite2), |