@@ 47-57 (lines=11) @@ | ||
44 | $this->findEncoding->setProcessFactory($this->processFactory); |
|
45 | } |
|
46 | ||
47 | public function testGetFileEncodingForASCIIFile() |
|
48 | { |
|
49 | $asciiFile = (new LocalFile(static::$dir . 'ascii_file.test')) |
|
50 | ->setEncoding('us-ascii'); |
|
51 | $asciiFile->put(mb_convert_encoding('Some random Text', 'ASCII')); |
|
52 | ||
53 | static::assertEquals( |
|
54 | strtolower($asciiFile->getEncoding()), |
|
55 | strtolower($this->findEncoding->getEncoding($asciiFile)) |
|
56 | ); |
|
57 | } |
|
58 | ||
59 | public function testGetFileEncodingForUtf8File() |
|
60 | { |
|
@@ 59-69 (lines=11) @@ | ||
56 | ); |
|
57 | } |
|
58 | ||
59 | public function testGetFileEncodingForUtf8File() |
|
60 | { |
|
61 | $utf8file = (new LocalFile(static::$dir . 'utf8_file.test')) |
|
62 | ->setEncoding('UTF-8'); |
|
63 | $utf8file->put(mb_convert_encoding('Some random Text €±§', 'UTF-8')); |
|
64 | ||
65 | static::assertEquals( |
|
66 | strtolower($utf8file->getEncoding()), |
|
67 | strtolower($this->findEncoding->getEncoding($utf8file)) |
|
68 | ); |
|
69 | } |
|
70 | ||
71 | public function testGetFileEncodingForCompressedFile() |
|
72 | { |