Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Commit

Permalink
Disable translit tests if intl isn't installed
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto committed Jan 2, 2015
1 parent 1570e3e commit eeaa79c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Faker/Provider/Internet.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public static function toAscii($string)
private static function transliterate($string)
{
if (function_exists('transliterator_transliterate')) {
$transString = transliterator_transliterate("Any-Latin; Latin-ASCII; NFD; [:Nonspacing Mark:] Remove; NFC; Lower();", $string);
$transString = transliterator_transliterate("Any-Latin; Latin-ASCII; NFD; [:Nonspacing Mark:] Remove; NFC; Lower();", $string);
} else {
$transString = static::toAscii($string);
}
Expand Down
2 changes: 2 additions & 0 deletions test/Faker/Provider/InternetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function localeDataProvider()
/**
* @link http://stackoverflow.com/questions/12026842/how-to-validate-an-email-address-in-php
*
* @requires PHP 5.4
* @dataProvider localeDataProvider
*/
public function testEmailIsValid($locale)
Expand All @@ -51,6 +52,7 @@ public function testEmailIsValid($locale)
}

/**
* @requires PHP 5.4
* @dataProvider localeDataProvider
*/
public function testUsernameIsValid($locale)
Expand Down

0 comments on commit eeaa79c

Please sign in to comment.