aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/AutonameTest.php
diff options
context:
space:
mode:
authormrjive <mrjive@mrjive.it>2018-03-13 10:59:21 +0100
committerGitHub <noreply@github.com>2018-03-13 10:59:21 +0100
commit790660e61264ed884a8c600f407cf75893ffe977 (patch)
tree8fb3e4263cd7cdf4b34e0d7bb859c2f290c8ab39 /tests/unit/AutonameTest.php
parent2bcfa0c12687d47c11e8c445a5a38ffe96d5c135 (diff)
parent53c1d3775cc140ecda50d837752adac851d9e0b2 (diff)
downloadvolse-hubzilla-790660e61264ed884a8c600f407cf75893ffe977.tar.gz
volse-hubzilla-790660e61264ed884a8c600f407cf75893ffe977.tar.bz2
volse-hubzilla-790660e61264ed884a8c600f407cf75893ffe977.zip
Merge pull request #18 from redmatrix/dev
Dev
Diffstat (limited to 'tests/unit/AutonameTest.php')
-rw-r--r--tests/unit/AutonameTest.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/unit/AutonameTest.php b/tests/unit/AutonameTest.php
index 33e237bb9..566fe6149 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