diff options
author | Andrey Andreev <narf@devilix.net> | 2016-01-30 21:43:41 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-01-30 21:43:41 +0100 |
commit | 391d339b921623ce921bdb5520fb93f9cf62fac5 (patch) | |
tree | 978fa5b92448b56eb6ddfb0012131d7fb04b4063 /tests/codeigniter | |
parent | 9aab22e0a1aa876b98dcfa58781b0ffde71f97a1 (diff) |
Fix #4415 and add unit tests for https://bugs.php.net/bug.php?id=51192
Diffstat (limited to 'tests/codeigniter')
-rw-r--r-- | tests/codeigniter/libraries/Form_validation_test.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/codeigniter/libraries/Form_validation_test.php b/tests/codeigniter/libraries/Form_validation_test.php index 65a3bbff7..f455b9146 100644 --- a/tests/codeigniter/libraries/Form_validation_test.php +++ b/tests/codeigniter/libraries/Form_validation_test.php @@ -231,6 +231,13 @@ class Form_validation_test extends CI_TestCase { $this->assertTrue($this->form_validation->valid_url('www.codeigniter.com')); $this->assertTrue($this->form_validation->valid_url('http://codeigniter.com')); + // https://bugs.php.net/bug.php?id=51192 + $this->assertTrue($this->form_validation->valid_url('http://accept-dashes.tld')); + $this->assertFalse($this->form_validation->valid_url('http://reject_underscores.tld')); + + // https://github.com/bcit-ci/CodeIgniter/issues/4415 + $this->assertTrue($this->form_validation->valid_url('http://[::1]/ipv6')); + $this->assertFalse($this->form_validation->valid_url('htt://www.codeIgniter.com')); $this->assertFalse($this->form_validation->valid_url('')); $this->assertFalse($this->form_validation->valid_url('code igniter')); |