From 747cceb48a6147fba3188d47a78c499f7cfda579 Mon Sep 17 00:00:00 2001 From: Jason Lam Date: Sat, 30 Jul 2016 11:23:34 -0700 Subject: [PATCH] Add Url Sanitize test and bump 2.6.0 --- README.md | 4 ++-- tests/UrlTest.php | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f8439c5..bb42cfd 100644 --- a/README.md +++ b/README.md @@ -124,14 +124,14 @@ It's recommended that you use [Composer](https://getcomposer.org/) to install St Manual install with composer ```bash -$ composer require jasonlam604/stringizer "^2.5.0" +$ composer require jasonlam604/stringizer "^2.6.0" ``` Using the composer.json file ```json "require": { - "jasonlam604/stringizer": "^2.5.0" + "jasonlam604/stringizer": "^2.6.0" } ``` diff --git a/tests/UrlTest.php b/tests/UrlTest.php index 599310e..2338304 100644 --- a/tests/UrlTest.php +++ b/tests/UrlTest.php @@ -36,4 +36,16 @@ public function testInValidUrl() $s = new Stringizer("https:///github.com"); $this->assertEquals(false, $s->isUrl()); } + + public function testUrlSantize() + { + + $s = new Stringizer("http://jason��lam604.co�m"); + + // Unsantized should fail + $this->assertEquals(false, $s->isUrl()); + + // Santize should pass + $this->assertEquals(true, $s->isUrl(true)); + } }