Skip to content

Commit

Permalink
Fix for test failure php 5.3+5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
JanPetterMG committed Nov 17, 2016
1 parent a2af87b commit a6e0b1b
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions tests/EncodingTest.php
Expand Up @@ -67,16 +67,6 @@ public function test_has_iconv()
$this->assertTrue(function_exists('iconv'));
}

/**
* Test if we have iconv (crazy if we don't)
*
* Used for depends
*/
public function test_has_uconverter()
{
$this->assertTrue(class_exists('\UConverter'));
}

/**#@+
* UTF-8 methods
*/
Expand Down Expand Up @@ -183,17 +173,13 @@ public function test_convert_UTF8_iconv($input, $expected, $encoding)
* Convert * to UTF-8 using UConverter
*
* Special cases only
* @depends test_has_uconverter
* @dataProvider toUTF8_uconverter
*/
public function test_convert_UTF8_uconverter($input, $expected, $encoding)
{
$encoding = SimplePie_Misc::encoding($encoding);
if (version_compare(phpversion(), '5.3', '<'))
if (version_compare(phpversion(), '5.5', '>='))
{
$this->assertEquals($expected, Mock_Misc::__callStatic('change_encoding_uconverter', array($input, $encoding, 'UTF-8')));
}
else {
$this->assertEquals($expected, Mock_Misc::change_encoding_uconverter($input, $encoding, 'UTF-8'));
}
}
Expand Down

0 comments on commit a6e0b1b

Please sign in to comment.