function testGetEncodingName() { ini_set('memory_limit', '1024M'); $dir = __DIR__ . '/../support'; $text_cp1251 = file_get_contents($dir . '/cp1251.txt'); $text_utf8 = file_get_contents($dir . '/utf8.txt'); $cp1251 = DryString::getEncodingName($text_cp1251); $utf8 = DryString::getEncodingName($text_utf8); $this->assertEquals('windows-1251', $cp1251); $this->assertEquals('UTF-8', $utf8); }