Remove unused method
Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
0432a8af70
commit
0fac07105e
@ -3281,23 +3281,6 @@ class Util
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replaces some characters by a displayable equivalent
|
||||
*
|
||||
* @param string $content content
|
||||
*
|
||||
* @return string the content with characters replaced
|
||||
*/
|
||||
public static function replaceBinaryContents($content)
|
||||
{
|
||||
$result = str_replace("\x00", '\0', $content);
|
||||
$result = str_replace("\x08", '\b', $result);
|
||||
$result = str_replace("\x0a", '\n', $result);
|
||||
$result = str_replace("\x0d", '\r', $result);
|
||||
$result = str_replace("\x1a", '\Z', $result);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts GIS data to Well Known Text format
|
||||
*
|
||||
|
||||
@ -105,37 +105,6 @@ class PMA_StringOperations_Test extends PHPUnit_Framework_TestCase
|
||||
$this->assertEquals($e, PMA\libraries\Util::userDir($a));
|
||||
}
|
||||
|
||||
/**
|
||||
* data provider for replace binary content test
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function replaceBinaryContentsDataProvider()
|
||||
{
|
||||
return array(
|
||||
array("\x000", '\00'),
|
||||
array("\x08\x0a\x0d\x1atest", '\b\n\r\Ztest'),
|
||||
array("\ntest", '\ntest')
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* replace binary contents test
|
||||
*
|
||||
* @param string $a String
|
||||
* @param string $e Expected output
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @dataProvider replaceBinaryContentsDataProvider
|
||||
*/
|
||||
public function testReplaceBinaryContents($a, $e)
|
||||
{
|
||||
$this->assertEquals(
|
||||
$e, PMA\libraries\Util::replaceBinaryContents($a)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* data provider for duplicate first newline test
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user