From: Jan Schneider Date: Tue, 4 Jan 2011 17:44:52 +0000 (+0100) Subject: Revert "Be more relaxed about the id length until bug #9484 is fixed." X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=af4be05b01c0bca7a9e567364ff7a96c93baf568;p=horde.git Revert "Be more relaxed about the id length until bug #9484 is fixed." This reverts commit a51fd48e8d8efcb481038f411ae8ccaaf1e9a148. --- diff --git a/framework/Support/test/Horde/Support/GuidTest.php b/framework/Support/test/Horde/Support/GuidTest.php index 3c94abe04..a18f817d2 100644 --- a/framework/Support/test/Horde/Support/GuidTest.php +++ b/framework/Support/test/Horde/Support/GuidTest.php @@ -23,10 +23,8 @@ class Horde_Support_GuidTest extends PHPUnit_Framework_TestCase { public function testFormat() { - $length = strlen(new Horde_Support_Guid()); - $this->assertLessThanOrEqual(48, $length); - $this->assertGreaterThanOrEqual(47, $length); - $this->assertRegExp('/\d{14}\.[-_0-9a-zA-Z]{22,23}@localhost/', (string)new Horde_Support_Guid()); + $this->assertEquals(48, strlen(new Horde_Support_Guid())); + $this->assertRegExp('/\d{14}\.[-_0-9a-zA-Z]{23}@localhost/', (string)new Horde_Support_Guid()); } public function testDuplicates() @@ -49,6 +47,6 @@ class Horde_Support_GuidTest extends PHPUnit_Framework_TestCase public function testOptions() { $this->assertStringEndsWith('example.com', (string)new Horde_Support_Guid(array('server' => 'example.com'))); - $this->assertRegExp('/\d{14}\.prefix\.[-_0-9a-zA-Z]{22,23}@localhost/', (string)new Horde_Support_Guid(array('prefix' => 'prefix'))); + $this->assertRegExp('/\d{14}\.prefix\.[-_0-9a-zA-Z]{23}@localhost/', (string)new Horde_Support_Guid(array('prefix' => 'prefix'))); } } diff --git a/framework/Support/test/Horde/Support/RandomidTest.php b/framework/Support/test/Horde/Support/RandomidTest.php index c9998f45f..3d2132b0f 100644 --- a/framework/Support/test/Horde/Support/RandomidTest.php +++ b/framework/Support/test/Horde/Support/RandomidTest.php @@ -23,9 +23,7 @@ class Horde_Support_RandomidTest extends PHPUnit_Framework_TestCase { public function testLength() { - $length = strlen(new Horde_Support_Randomid()); - $this->assertLessThanOrEqual(23, $length); - $this->assertGreaterThanOrEqual(22, $length); + $this->assertEquals(23, strlen(new Horde_Support_Randomid())); } public function testDuplicates()