@@ 118-126 (lines=9) @@ | ||
115 | ); |
|
116 | } |
|
117 | ||
118 | public function testSettingKeepOldToTrueFileWillKeepTheFile() |
|
119 | { |
|
120 | $asciiFile = new LocalFile(static::$dir . 'ascii_keep.test'); |
|
121 | $asciiFile->put(mb_convert_encoding('Some random Text', 'ASCII')); |
|
122 | ||
123 | $this->converter->toEncoding($asciiFile, 'UTF-8', ['keepOldFile' => true]); |
|
124 | ||
125 | static::assertTrue($asciiFile->exists(), "The original file should exist"); |
|
126 | } |
|
127 | ||
128 | public function testSettingKeepOldFileToFalseWillDeleteTheFile() |
|
129 | { |
|
@@ 128-136 (lines=9) @@ | ||
125 | static::assertTrue($asciiFile->exists(), "The original file should exist"); |
|
126 | } |
|
127 | ||
128 | public function testSettingKeepOldFileToFalseWillDeleteTheFile() |
|
129 | { |
|
130 | $asciiFile = new LocalFile(static::$dir . 'ascii_delete.test'); |
|
131 | $asciiFile->put(mb_convert_encoding('Some random Text', 'ASCII')); |
|
132 | ||
133 | $this->converter->toEncoding($asciiFile, 'UTF-8', ['keepOldFile' => false]); |
|
134 | ||
135 | static::assertFalse($asciiFile->exists(), "The original file should be deleted"); |
|
136 | } |
|
137 | ||
138 | public function testConversionWillFailWhenSpecifyingAnInvalidEncoding() |
|
139 | { |