Skip to content

Commit

Permalink
Add Url Sanitize test and bump 2.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonlam604 committed Jul 30, 2016
1 parent d5f7427 commit 747cceb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
```

Expand Down
12 changes: 12 additions & 0 deletions tests/UrlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

0 comments on commit 747cceb

Please sign in to comment.