Skip to content

Commit

Permalink
Create tests for german dates and umlaute
Browse files Browse the repository at this point in the history
  • Loading branch information
Art4 committed Sep 2, 2016
1 parent 85f0e53 commit c2a801d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ $urlLinker->setAllowFtpAddresses(true);
// Uppercase URL schemes like "HTTP://exmaple.com" will be allowed:
$urlLinker->setAllowUpperCaseUrlSchemes(true);

// Uppercase URL schemes like "HTTP://exmaple.com" will be allowed:
$urlLinker->setAllowUpperCaseUrlSchemes(true);

// Add a Closure to modify the way the urls will be linked:
$urlLinker->setHtmlLinkCreator(function($url, $content)
{
Expand Down
9 changes: 9 additions & 0 deletions tests/integration/UrlLinkerTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public function provideTextsNotContainingAnyUrls()
array(''),
array('Hello World!'),
array('Looks like www.it.contains.an.url/somewhere but it really does not'),
array('This german date 20.07.1963 isn\'t a domain.'), // @see https://bitbucket.org/kwi/urllinker/issues/23/german-dates-get-turned-into-links
);
}

Expand Down Expand Up @@ -114,6 +115,14 @@ public function provideTextsWithLinksWithoutHtml()
'e.com/żółć',
$this->link('http://e.com/żółć', 'e.com/żółć')
),
// german umlaute, @see https://bitbucket.org/kwi/urllinker/issues/13/special-characters-like-seems-break-it-up
array(
'visiüble www.pc.fi hidden ö hidden a.bc visibleä',
sprintf(
'visiüble %s hidden ö hidden a.bc visibleä',
$this->link('http://www.pc.fi', 'www.pc.fi')
),
),

// url-encoded url
array(
Expand Down

0 comments on commit c2a801d

Please sign in to comment.