Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding test case for Validation::url(). Disproves #552

  • Loading branch information...
commit b3f860b762c301f1f042f53573bbd5d4863dd5fa 1 parent 518cab9
@ADmad ADmad authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 cake/tests/cases/libs/validation.test.php
View
5 cake/tests/cases/libs/validation.test.php
@@ -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'));
@@ -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'));
Please sign in to comment.
Something went wrong with that request. Please try again.