mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 13:03:20 +00:00
php fallback if function "phrasea_utf8_convert_to" is not available
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,25 @@ class unicodeTest extends PhraseanetPHPUnitAbstract
|
|||||||
$this->object = new unicode();
|
$this->object = new unicode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers \unicode::testUtf8_convert_to
|
||||||
|
*/
|
||||||
|
public function testUtf8_convert_to()
|
||||||
|
{
|
||||||
|
$this->assertEquals('éléphant à rôtir', $this->object->utf8_convert_to('ÉLÉPHANT à rôtir', unicode::CONVERT_TO_LC));
|
||||||
|
$this->assertEquals('ELEPHANT a rotir', $this->object->utf8_convert_to('ÉLÉPHANT à rôtir', unicode::CONVERT_TO_ND));
|
||||||
|
$this->assertEquals('elephant a rotir', $this->object->utf8_convert_to('ÉLÉPHANT à rôtir', unicode::CONVERT_TO_LCND));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers \unicode::testUtf8_convert_to
|
||||||
|
* @expectedException Exception_InvalidArgument
|
||||||
|
*/
|
||||||
|
public function testUtf8_convert_to_ex()
|
||||||
|
{
|
||||||
|
$this->assertEquals('éléphant à rôtir', $this->object->utf8_convert_to('ÉLÉPHANT à rôtir', 'bad-method'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers \unicode::remove_diacritics
|
* @covers \unicode::remove_diacritics
|
||||||
*/
|
*/
|
||||||
@@ -25,6 +44,7 @@ class unicodeTest extends PhraseanetPHPUnitAbstract
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
* @covers \unicode::remove_nonazAZ09
|
* @covers \unicode::remove_nonazAZ09
|
||||||
*/
|
*/
|
||||||
public function testRemove_nonazAZ09()
|
public function testRemove_nonazAZ09()
|
||||||
|
Reference in New Issue
Block a user