Fix a PHP error in a unit test for PHP7.2.

This commit is contained in:
Klaus Weidenbach 2017-11-25 19:01:53 +01:00
parent ee929752e3
commit 063654373d

View File

@ -57,7 +57,7 @@ class AutonameTest extends TestCase {
// public function testAutonameMaxLength() { // public function testAutonameMaxLength() {
// $autoname2=autoname(PHP_INT_MAX); // $autoname2=autoname(PHP_INT_MAX);
// $this->assertEquals(PHP_INT_MAX, count($autoname2)); // $this->assertEquals(PHP_INT_MAX, strlen($autoname2));
// } // }
/** /**
@ -65,14 +65,14 @@ class AutonameTest extends TestCase {
*/ */
public function testAutonameLength1() { public function testAutonameLength1() {
$autoname1=autoname(1); $autoname1=autoname(1);
$this->assertEquals(1, count($autoname1)); $this->assertEquals(1, strlen($autoname1));
$autoname2=autoname(1); $autoname2=autoname(1);
$this->assertEquals(1, count($autoname2)); $this->assertEquals(1, strlen($autoname2));
// The following test is problematic, with only 26 possibilities // The following test is problematic, with only 26 possibilities
// generating the same thing twice happens often aka // generating the same thing twice happens often aka
// birthday paradox // birthday paradox
// $this->assertFalse($autoname1==$autoname2); // $this->assertFalse($autoname1==$autoname2);
} }
} }