Revert "Be more relaxed about the id length until bug #9484 is fixed."
authorJan Schneider <jan@horde.org>
Tue, 4 Jan 2011 17:44:52 +0000 (18:44 +0100)
committerJan Schneider <jan@horde.org>
Tue, 4 Jan 2011 17:44:52 +0000 (18:44 +0100)
This reverts commit a51fd48e8d8efcb481038f411ae8ccaaf1e9a148.

framework/Support/test/Horde/Support/GuidTest.php
framework/Support/test/Horde/Support/RandomidTest.php

index 3c94abe..a18f817 100644 (file)
@@ -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')));
     }
 }
index c9998f4..3d2132b 100644 (file)
@@ -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()