public function testEncodeArrayRecursive() { $source = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . '_fixtures' . DIRECTORY_SEPARATOR . 'cp1252.txt'); $target = file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . '_fixtures' . DIRECTORY_SEPARATOR . 'utf-8.txt'); $input = array(array($source), $source); $expected = array(array($target), $target); $this->assertEquals($expected, $this->filter->filter($input)); }
/** * Converts response from Collmex API to UTF-8 * * @param string $text * * @return string */ protected function convertEncodingFromCollmex($text) { $filter = new Windows1252ToUtf8(); return $filter->filter($text); }