Skip to content

Commit

Permalink
added basic test for UConverter::setSourceEncoding()
Browse files Browse the repository at this point in the history
  • Loading branch information
AMcNeice authored and petk committed Feb 19, 2019
1 parent d194ceb commit 5bbf0c6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ext/intl/tests/uconverter_setSourceEncoding.phpt
@@ -0,0 +1,17 @@
--TEST--
UConverter::setSourceEncoding()
--CREDITS--
Andy McNeice - PHP Testfest 2017
--INI--
intl.error_level = E_WARNING
--SKIPIF--
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
--FILE--
<?php
$c = new UConverter('latin1', 'ascii');
var_dump($c->getSourceEncoding());
$c->setSourceEncoding('utf-7');
var_dump($c->getSourceEncoding());
--EXPECT--
string(8) "US-ASCII"
string(5) "UTF-7"

0 comments on commit 5bbf0c6

Please sign in to comment.