diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-10-22 09:28:18 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-10-22 09:28:18 +0400 |
commit | d59a45092b0555cbe6bd670ce5a578ce44c0af4a (patch) | |
tree | 51008487b83a9ff0b1c43ba79393331976f8eec8 /tests | |
parent | 0e20eaf130da870dada405710b3367e1b20d5e86 (diff) |
Fix tests after 9425c0f6d0134a65b0e22d9971923d03f83dcfa8
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PHPUnit/Integration/AccessTest.php | 15 | ||||
-rw-r--r-- | tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml | 8 |
2 files changed, 19 insertions, 4 deletions
diff --git a/tests/PHPUnit/Integration/AccessTest.php b/tests/PHPUnit/Integration/AccessTest.php index f309d1dc99..42ea67c28d 100644 --- a/tests/PHPUnit/Integration/AccessTest.php +++ b/tests/PHPUnit/Integration/AccessTest.php @@ -54,6 +54,21 @@ class Core_AccessTest extends IntegrationTestCase $this->assertTrue($access->hasSuperUserAccess()); } + public function test_GetLogin_UserIsNotAnonymous_WhenSuperUserAccess() + { + $access = Access::getInstance(); + $access->setSuperUserAccess(true); + $this->assertNotEmpty($access->getLogin()); + $this->assertNotSame('anonymous', $access->getLogin()); + } + + public function test_GetLogin_UserIsAnonymous_WhenNoSuperUserAccess() + { + $access = Access::getInstance(); + $access->setSuperUserAccess(false); + $this->assertNull($access->getLogin()); + } + public function testHasSuperUserAccessWithNoSuperUserAccess() { $access = Access::getInstance(); diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml index 9d1a4c46f5..9709fdfbaf 100644 --- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml +++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getSegmentsMetadata.xml @@ -56,7 +56,7 @@ <name>Visitor IP</name> <segment>visitIp</segment> <acceptedValues>13.54.122.1. </code>Select IP ranges with notation: <code>visitIp>13.54.122.0;visitIp<13.54.122.255</acceptedValues> - <permission>0</permission> + <permission>1</permission> </row> <row> <type>dimension</type> @@ -162,7 +162,7 @@ <name>User ID</name> <segment>userId</segment> <acceptedValues>any non empty unique string identifying the user (such as an email address or a username).</acceptedValues> - <permission>0</permission> + <permission>1</permission> </row> <row> <type>dimension</type> @@ -177,7 +177,7 @@ <name>Visit ID</name> <segment>visitId</segment> <acceptedValues>Any integer. </acceptedValues> - <permission>0</permission> + <permission>1</permission> </row> <row> <type>dimension</type> @@ -199,7 +199,7 @@ <name>Visitor ID</name> <segment>visitorId</segment> <acceptedValues>34c31e04394bdc63 - any 16 Hexadecimal chars ID, which can be fetched using the Tracking API function getVisitorId()</acceptedValues> - <permission>0</permission> + <permission>1</permission> </row> <row> <type>dimension</type> |