@@ 36-46 (lines=11) @@ | ||
33 | $this->findEncoding->setProcessFactory($this->processFactory); |
|
34 | } |
|
35 | ||
36 | public function testGetFileEncodingForASCIIFile() |
|
37 | { |
|
38 | $asciiFile = (new LocalFile(static::$dir . 'ascii_file.test')) |
|
39 | ->setEncoding('us-ascii'); |
|
40 | $asciiFile->put(mb_convert_encoding('Some random Text', 'ASCII')); |
|
41 | ||
42 | static::assertEquals( |
|
43 | strtolower($asciiFile->getEncoding()), |
|
44 | strtolower($this->findEncoding->getEncoding($asciiFile)) |
|
45 | ); |
|
46 | } |
|
47 | ||
48 | public function testGetFileEncodingForUtf8File() |
|
49 | { |
|
@@ 48-58 (lines=11) @@ | ||
45 | ); |
|
46 | } |
|
47 | ||
48 | public function testGetFileEncodingForUtf8File() |
|
49 | { |
|
50 | $utf8file = (new LocalFile(static::$dir . 'utf8_file.test')) |
|
51 | ->setEncoding('UTF-8'); |
|
52 | $utf8file->put(mb_convert_encoding('Some random Text €±§', 'UTF-8')); |
|
53 | ||
54 | static::assertEquals( |
|
55 | strtolower($utf8file->getEncoding()), |
|
56 | strtolower($this->findEncoding->getEncoding($utf8file)) |
|
57 | ); |
|
58 | } |
|
59 | ||
60 | public function testGetFileEncodingForCompressedFile() |
|
61 | { |