for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Onoi\Tesa\Tests;
use Onoi\Tesa\Normalizer;
/**
* @covers \Onoi\Tesa\Normalizer
* @group onoi-tesa
*
* @license GNU GPL v2+
* @since 0.1
* @author mwjames
*/
class NormalizerTest extends \PHPUnit_Framework_TestCase {
public function testTransliteration() {
$this->assertEquals(
'AAAAAEAaaaaaeaOOOOOOEOoooooeoEEEEeeeeðCcÐIIIIiiiiUUUUEuuuueNnSsYyyZz',
Normalizer::applyTransliteration( 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž' )
);
}
public function testConvertDoubleWidth() {
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
Normalizer::convertDoubleWidth( '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' )
public function testReduceLengthTo() {
'ABC',
Normalizer::reduceLengthTo( 'ABCDEF', 3 )
'ABCDEF',
Normalizer::reduceLengthTo( 'ABCDEF' )
'ABCD',
Normalizer::reduceLengthTo( 'ABCD EF', 4 )
Normalizer::reduceLengthTo( 'ABC D EF', 4 )
Normalizer::reduceLengthTo( 'ABCD EF', 5 )
'abc def gh',
Normalizer::reduceLengthTo( 'abc def gh in 123', 12 )
public function testToLowercase() {
'abcdef',
Normalizer::toLowercase( 'ABCDEF' )