adjust validate-test for 'sql username too long' for mariadb
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -149,7 +149,7 @@ class ValidateTest extends TestCase
|
|||||||
$result = Validate::validateDomain('abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz');
|
$result = Validate::validateDomain('abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz');
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testValidateHostname()
|
public function testValidateHostname()
|
||||||
{
|
{
|
||||||
$result = Validate::validateLocalHostname('localhost');
|
$result = Validate::validateLocalHostname('localhost');
|
||||||
@@ -167,7 +167,7 @@ class ValidateTest extends TestCase
|
|||||||
$result = Validate::validateLocalHostname('a-----------------------------------------------------------------');
|
$result = Validate::validateLocalHostname('a-----------------------------------------------------------------');
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testValidateEmail()
|
public function testValidateEmail()
|
||||||
{
|
{
|
||||||
$result = Validate::validateEmail('team@froxlor.org');
|
$result = Validate::validateEmail('team@froxlor.org');
|
||||||
@@ -175,7 +175,7 @@ class ValidateTest extends TestCase
|
|||||||
$result = Validate::validateEmail('team.froxlor.org');
|
$result = Validate::validateEmail('team.froxlor.org');
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testValidateUsername()
|
public function testValidateUsername()
|
||||||
{
|
{
|
||||||
$result = Validate::validateUsername('web123sql2');
|
$result = Validate::validateUsername('web123sql2');
|
||||||
@@ -184,7 +184,7 @@ class ValidateTest extends TestCase
|
|||||||
$result = Validate::validateUsername('web123sql2', true, $mysql_max);
|
$result = Validate::validateUsername('web123sql2', true, $mysql_max);
|
||||||
$this->assertTrue($result);
|
$this->assertTrue($result);
|
||||||
// too long
|
// too long
|
||||||
$result = Validate::validateUsername('myperfectsuperduperwebuser123sql2', true, $mysql_max);
|
$result = Validate::validateUsername('myperfectsuperduperwebuserwhosnameisenormouslylongandprettyandshouldinnowaybeaccepted123sql2', true, $mysql_max);
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
// not unix-conform
|
// not unix-conform
|
||||||
$result = Validate::validateUsername('web123-sql2', true, $mysql_max);
|
$result = Validate::validateUsername('web123-sql2', true, $mysql_max);
|
||||||
@@ -199,7 +199,7 @@ class ValidateTest extends TestCase
|
|||||||
$result = Validate::validateUsername('web123sql2-', false, $mysql_max);
|
$result = Validate::validateUsername('web123sql2-', false, $mysql_max);
|
||||||
$this->assertFalse($result);
|
$this->assertFalse($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testValidateSqlInterval()
|
public function testValidateSqlInterval()
|
||||||
{
|
{
|
||||||
$result = Validate::validateSqlInterval('60 HOUR');
|
$result = Validate::validateSqlInterval('60 HOUR');
|
||||||
|
|||||||
Reference in New Issue
Block a user