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