mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-09 13:36:07 +09:00
30 lines
674 B
PHP
30 lines
674 B
PHP
<?php
|
|
/**
|
|
* @group Core
|
|
*/
|
|
class Box_ValidateTest extends PHPUnit_Framework_TestCase
|
|
{
|
|
public static function domains() {
|
|
return array(
|
|
array('google', true),
|
|
array('1goo-gle', true),
|
|
|
|
//punny code
|
|
array('xn--bcher-kva', true),
|
|
|
|
array('qqq45%%%', false),
|
|
array('()1google', false),
|
|
array('//asdasd()()', false),
|
|
array('--asdasd()()', false),
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @dataProvider domains
|
|
*/
|
|
public function testValidator($domain, $valid)
|
|
{
|
|
$v = new Box_Validate();
|
|
$this->assertEquals($valid, $v->isSldValid($domain));
|
|
}
|
|
} |