Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

Commit

Permalink
Fix double shim declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Jan 29, 2015
1 parent 9639d28 commit 01f0ed1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ php:
- 5.6
- hhvm-nightly

matrix:
allow_failures:
- php: hhvm-nightly

script:
- phpunit --coverage-text
- phpunit --group unicode --coverage-text
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v1.2.1 (2015-01-28)

- fix double declaration in mbstring shim

## v1.2.0 (2015-01-12)

- add u::strwidth() to get the width of a string when printed on a terminal
Expand Down
1 change: 0 additions & 1 deletion class/Patchwork/Utf8/Bootup/mbstring.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ function mb_strpos($s, $needle, $offset = 0, $enc = INF) {return s\Mbstring::mb_
function mb_strtolower($s, $enc = INF) {return s\Mbstring::mb_strtolower($s, $enc);};
function mb_strtoupper($s, $enc = INF) {return s\Mbstring::mb_strtoupper($s, $enc);};
function mb_substitute_character($char = INF) {return s\Mbstring::mb_substitute_character($char);};
function mb_substr_count($s, $needle) {return substr_count($s, $needle);};
function mb_substr($s, $start, $length = 2147483647, $enc = INF) {return s\Mbstring::mb_substr($s, $start, $length, $enc);};
function mb_stripos($s, $needle, $offset = 0, $enc = INF) {return s\Mbstring::mb_stripos($s, $needle, $offset, $enc);};
function mb_stristr($s, $needle, $part = false, $enc = INF) {return s\Mbstring::mb_stristr($s, $needle, $part, $enc);};
Expand Down
4 changes: 4 additions & 0 deletions tests/Patchwork/Tests/Utf8Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,10 @@ function testUtf8EncodeDecode()
*/
function testJson_decode()
{
if (!function_exists('json_encode')) {
$this->markTestSkipped('json extension is not loaded');
}

$c = "déjà";
$d = n::normalize($c, n::NFD);
$this->assertSame( $c, u::json_decode(json_encode($d)) );
Expand Down

0 comments on commit 01f0ed1

Please sign in to comment.