diff options
author | zotlabs <mike@macgirvin.com> | 2018-02-26 14:30:04 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-02-26 14:30:04 -0800 |
commit | cbcf389f500a7179422ed9a9736f46bbdcc5eca2 (patch) | |
tree | 80f461ce0c59b149f8bd13d218cce6e87732c8e8 /tests | |
parent | d2ed3a9abbb5c68d1a02eae629bc103aa43a1263 (diff) | |
download | volse-hubzilla-cbcf389f500a7179422ed9a9736f46bbdcc5eca2.tar.gz volse-hubzilla-cbcf389f500a7179422ed9a9736f46bbdcc5eca2.tar.bz2 volse-hubzilla-cbcf389f500a7179422ed9a9736f46bbdcc5eca2.zip |
fix autoname test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/AutonameTest.php | 7 |
1 files changed, 5 insertions, 2 deletions
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 |