Skip to content

Commit

Permalink
Adding test case for Validation::url(). Disproves #552
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Apr 6, 2010
1 parent 518cab9 commit b3f860b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cake/tests/cases/libs/validation.test.php
Expand Up @@ -1784,12 +1784,12 @@ function testIpv6() {
*
* @return void
* @access public
*/
*/
function testIpBoth() {
$this->assertTrue(Validation::ip('0.0.0.0'));
$this->assertTrue(Validation::ip('192.168.1.156'));
$this->assertTrue(Validation::ip('255.255.255.255'));

$this->assertFalse(Validation::ip('127.0.0'));
$this->assertFalse(Validation::ip('127.0.0.a'));
$this->assertFalse(Validation::ip('127.0.0.256'));
Expand Down Expand Up @@ -1876,6 +1876,7 @@ function testUrl() {
$this->assertFalse(Validation::url('www.cakephp.org', true));
$this->assertTrue(Validation::url('http://www.cakephp.org', true));
$this->assertTrue(Validation::url('http://example.com/~userdir/'));
$this->assertTrue(Validation::url('http://www.jaist.ac.jp/~hoangle/filesj/index.html'));

$this->assertTrue(Validation::url('http://cakephp.org:80'));
$this->assertTrue(Validation::url('http://cakephp.org:443'));
Expand Down

0 comments on commit b3f860b

Please sign in to comment.