]> git.mxchange.org Git - friendica.git/blobdiff - tests/autoname_test.php
Solved a problem with author links that are different from what is provided in the...
[friendica.git] / tests / autoname_test.php
old mode 100755 (executable)
new mode 100644 (file)
index 9dae920..702e05b
@@ -40,7 +40,7 @@ class AutonameTest extends PHPUnit_Framework_TestCase {
         */\r
        public function testAutonameNoLength() {\r
                $autoname1=autoname(0);\r
-               $this->assertEquals(0, count($autoname1));\r
+               $this->assertEquals(0, strlen($autoname1));\r
        }\r
        
        /**
@@ -50,7 +50,7 @@ class AutonameTest extends PHPUnit_Framework_TestCase {
         */\r
        public function testAutonameNegativeLength() {\r
                $autoname1=autoname(-23);\r
-               $this->assertEquals(0, count($autoname1));\r
+               $this->assertEquals(0, strlen($autoname1));\r
        }\r
        \r
        //      public function testAutonameMaxLength() {\r
@@ -67,7 +67,10 @@ class AutonameTest extends PHPUnit_Framework_TestCase {
                
                $autoname2=autoname(1);\r
                $this->assertEquals(1, count($autoname2));
-               
-               $this->assertFalse($autoname1==$autoname2); \r
+
+               // The following test is problematic, with only 26 possibilities
+               // generating the same thing twice happens often aka
+               // birthday paradox
+//             $this->assertFalse($autoname1==$autoname2); \r
        }
 }
\ No newline at end of file