X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=tests%2Fautoname_test.php;h=702e05befc33ff210cfe3297f07cf0036a408cf5;hb=a077e63fa58992fe04eeb7f5aa9a865985fa1039;hp=9dae920ca29eba21d54a3daee566dcad061950d0;hpb=e5c29fcc786cee73c08247824cb87e9ed65a2c36;p=friendica.git diff --git a/tests/autoname_test.php b/tests/autoname_test.php old mode 100755 new mode 100644 index 9dae920ca2..702e05befc --- a/tests/autoname_test.php +++ b/tests/autoname_test.php @@ -40,7 +40,7 @@ class AutonameTest extends PHPUnit_Framework_TestCase { */ public function testAutonameNoLength() { $autoname1=autoname(0); - $this->assertEquals(0, count($autoname1)); + $this->assertEquals(0, strlen($autoname1)); } /** @@ -50,7 +50,7 @@ class AutonameTest extends PHPUnit_Framework_TestCase { */ public function testAutonameNegativeLength() { $autoname1=autoname(-23); - $this->assertEquals(0, count($autoname1)); + $this->assertEquals(0, strlen($autoname1)); } // public function testAutonameMaxLength() { @@ -67,7 +67,10 @@ class AutonameTest extends PHPUnit_Framework_TestCase { $autoname2=autoname(1); $this->assertEquals(1, count($autoname2)); - - $this->assertFalse($autoname1==$autoname2); + + // The following test is problematic, with only 26 possibilities + // generating the same thing twice happens often aka + // birthday paradox +// $this->assertFalse($autoname1==$autoname2); } } \ No newline at end of file