@@ 101-109 (lines=9) @@ | ||
98 | static::assertEquals(['some fish like pants should be replaced'], $newFile->getContents()); |
|
99 | } |
|
100 | ||
101 | public function testCallingReplaceTextWithArraysThatHaveMismatchedCountsThrowsAnException() |
|
102 | { |
|
103 | $file = new LocalFile(static::$dir . 'multiple_replace_failure.test'); |
|
104 | $file->put('some text that text should be replaced'); |
|
105 | ||
106 | $this->expectException(InvalidArgumentException::class); |
|
107 | ||
108 | $this->replacer->replaceText($file, ['text', 'pants that'], ['pants']); |
|
109 | } |
|
110 | ||
111 | public function testAddingAPostfixToTheEndOfTheFile() |
|
112 | { |
|
@@ 176-184 (lines=9) @@ | ||
173 | static::assertEquals('option_pass_through-pass.test', $newFile->getFilename()); |
|
174 | } |
|
175 | ||
176 | public function testCallingModifyWithNoFromTextThrowsInvalidArgumentsException() |
|
177 | { |
|
178 | $this->expectException(InvalidArgumentException::class); |
|
179 | ||
180 | $file = new LocalFile(static::$dir . 'simple_replace.test'); |
|
181 | $file->put('some text that text should be replaced'); |
|
182 | ||
183 | $this->replacer->modify($file, ['toText' => 'pants']); |
|
184 | } |
|
185 | ||
186 | public function testCallingModifyWithNoToTextThrowsInvalidArgumentsException() |
|
187 | { |
|
@@ 186-194 (lines=9) @@ | ||
183 | $this->replacer->modify($file, ['toText' => 'pants']); |
|
184 | } |
|
185 | ||
186 | public function testCallingModifyWithNoToTextThrowsInvalidArgumentsException() |
|
187 | { |
|
188 | $this->expectException(InvalidArgumentException::class); |
|
189 | ||
190 | $file = new LocalFile(static::$dir . 'simple_replace.test'); |
|
191 | $file->put('some text that text should be replaced'); |
|
192 | ||
193 | $this->replacer->modify($file, ['fromText' => 'pants']); |
|
194 | } |
|
195 | ||
196 | public function testCallingModifyWithANonLocalFileWillThrowAnException() |
|
197 | { |