From cbcf389f500a7179422ed9a9736f46bbdcc5eca2 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 26 Feb 2018 14:30:04 -0800 Subject: fix autoname test --- tests/unit/AutonameTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/unit/AutonameTest.php b/tests/unit/AutonameTest.php index 33e237bb9..314849b39 100644 --- a/tests/unit/AutonameTest.php +++ b/tests/unit/AutonameTest.php @@ -62,13 +62,16 @@ class AutonameTest extends TestCase { /** * test with a length, that may be too short + * length is maximum - autoname can return something shorter. */ public function testAutonameLength1() { $autoname1=autoname(1); - $this->assertEquals(1, strlen($autoname1)); + $test = ((strlen($autoname1) < 2) ? 1 : 0); + $this->assertEquals(1, $test); $autoname2=autoname(1); - $this->assertEquals(1, strlen($autoname2)); + $test = ((strlen($autoname2) < 2) ? 1 : 0); + $this->assertEquals(1, $test)); // The following test is problematic, with only 26 possibilities // generating the same thing twice happens often aka -- cgit v1.2.3 From 68c6d7a099e8615a135b75464e308c719bd9b0fe Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 27 Feb 2018 09:55:10 +0100 Subject: fix syntax error --- tests/unit/AutonameTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/unit/AutonameTest.php b/tests/unit/AutonameTest.php index 314849b39..566fe6149 100644 --- a/tests/unit/AutonameTest.php +++ b/tests/unit/AutonameTest.php @@ -71,7 +71,7 @@ class AutonameTest extends TestCase { $autoname2=autoname(1); $test = ((strlen($autoname2) < 2) ? 1 : 0); - $this->assertEquals(1, $test)); + $this->assertEquals(1, $test); // The following test is problematic, with only 26 possibilities // generating the same thing twice happens often aka -- cgit v1.2.3