From a11c771993bd31d9a20ad92f4f79570bb7aeb282 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 16 Apr 2013 13:34:37 +0200 Subject: [PATCH] Qual: More PHPUnit tests --- test/phpunit/Functions2Test.php | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/test/phpunit/Functions2Test.php b/test/phpunit/Functions2Test.php index 46f662576f5..3c44e004fc9 100755 --- a/test/phpunit/Functions2Test.php +++ b/test/phpunit/Functions2Test.php @@ -127,8 +127,32 @@ class Functions2Test extends PHPUnit_Framework_TestCase $result=jsUnEscape('%u03BD%u03B5%u03BF'); print __METHOD__." result=".$result."\n"; $this->assertEquals('νεο',$result); - - return; } + + /** + * isValidMailDomain + * + * @return void + */ + public function testIsValidMailDomain() + { + + } + + /** + * isValidURL + * + * @return void + */ + public function testIsValidUrl() + { + $result=isValidUrl('http://www.google.com',1); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(1,$result); + $result=isValidUrl('www.google.com',2); + print __METHOD__." result=".$result."\n"; + $this->assertEquals(0,$result); + } + } ?> \ No newline at end of file