From b9a715bdfd622e93dcbb1b240551728d221630af Mon Sep 17 00:00:00 2001 From: Matt Farina Date: Wed, 28 Aug 2013 16:05:55 -0400 Subject: [PATCH] Fixing errors in unit tests for PHP 5.4+ and the way array keys for non-existant keys are handled. --- test/Tests/IdentityServicesTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/Tests/IdentityServicesTest.php b/test/Tests/IdentityServicesTest.php index 37d844c..efcb6ad 100644 --- a/test/Tests/IdentityServicesTest.php +++ b/test/Tests/IdentityServicesTest.php @@ -138,7 +138,7 @@ class IdentityServicesTest extends \HPCloud\Tests\TestCase { $this->assertNotEmpty($tok2); $details = $service->tokenDetails(); - $this->assertEmpty($details['tenant']); + $this->assertFalse(isset($details['tenant'])); } /** @@ -248,7 +248,7 @@ class IdentityServicesTest extends \HPCloud\Tests\TestCase { // Details for account auth. $details = $service->tokenDetails(); $this->assertNotEmpty($details['id']); - $this->assertEmpty($details['tenant']); + $this->assertFalse(isset($details['tenant'])); $ts = strtotime($details['expires']); $this->assertGreaterThan($now, $ts); @@ -384,7 +384,7 @@ class IdentityServicesTest extends \HPCloud\Tests\TestCase { $this->assertNotEmpty($token); $details = $service->tokenDetails(); - $this->assertEmpty($details['tenant']); + $this->assertFalse(isset($details['tenant'])); // With no tenant ID, there should be only // one entry in the catalog. @@ -402,7 +402,7 @@ class IdentityServicesTest extends \HPCloud\Tests\TestCase { // Test unscoping $service->rescopeUsingTenantId(''); $details = $service->tokenDetails(); - $this->assertEmpty($details['tenant']); + $this->assertFalse(isset($details['tenant'])); $catalog = $service->serviceCatalog(); $this->assertEquals(1, count($catalog)); @@ -424,7 +424,7 @@ class IdentityServicesTest extends \HPCloud\Tests\TestCase { $this->assertNotEmpty($token); $details = $service->tokenDetails(); - $this->assertEmpty($details['tenant']); + $this->assertFalse(isset($details['tenant'])); // With no tenant ID, there should be only // one entry in the catalog. @@ -442,7 +442,7 @@ class IdentityServicesTest extends \HPCloud\Tests\TestCase { // Test unscoping $service->rescope(''); $details = $service->tokenDetails(); - $this->assertEmpty($details['tenant']); + $this->assertFalse(isset($details['tenant'])); $catalog = $service->serviceCatalog(); $this->assertEquals(1, count($catalog));