Fuente: https://github.com/chamilo/chamilo-lms/releases/download/v1.11.40/chamilo-1.11.40.zip sha256: 1cf4bf2cc7bae1ef1a1eff643235db1d552f78ddf4b6dd1e2d2dac9868679439 Snapshot independiente (rama huerfana); diffable vs 1.11.38. vendor incluido.
23 lines
657 B
PHP
23 lines
657 B
PHP
<?php
|
|
namespace Ddeboer\DataImport\Tests\ValueConverter;
|
|
|
|
use Ddeboer\DataImport\ValueConverter\CharsetValueConverter;
|
|
|
|
/**
|
|
* @author Markus Bachmann <markus.bachmann@bachi.biz>
|
|
*/
|
|
class CharsetValueConverterTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
public function testConvert()
|
|
{
|
|
$utf8 = utf8_encode('test');
|
|
|
|
$converter = new CharsetValueConverter('UTF-8');
|
|
$this->assertEquals($utf8, call_user_func($converter, $utf8));
|
|
|
|
$value = iconv('UTF-8', 'UTF-16', $utf8);
|
|
$converter = new CharsetValueConverter('UTF-8', 'UTF-16');
|
|
$this->assertEquals($utf8, call_user_func($converter, $value));
|
|
}
|
|
}
|