File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,20 @@ public function testWriteMapToPhpClassFile(): void
171
171
$ this ->fileSystem ->remove (__DIR__ . '/../fixtures/MiniMap.php ' );
172
172
}
173
173
174
+ public function testWriteMapToPhpClassFileFailure (): void
175
+ {
176
+ $ this ->fileSystem ->copy (__DIR__ . '/../fixtures/MiniMap.php.test ' , __DIR__ . '/../fixtures/MiniMap.php ' );
177
+ include_once (__DIR__ . '/../fixtures/MiniMap.php ' );
178
+ // @phpstan-ignore class.notFound, argument.type
179
+ MapHandler::setDefaultMapClass (MiniMap::class);
180
+ $ map_a = MapHandler::map ();
181
+ $ this ->assertStringContainsString ('fixtures/MiniMap.php ' , $ map_a ->getFileName ());
182
+ $ content = file_get_contents ($ map_a ->getFileName ());
183
+ assert (is_string ($ content ));
184
+ $ this ->assertStringNotContainsString ('text/plain ' , $ content );
185
+ $ this ->updater ->writeMapToPhpClassFile ("foo://bar.stub " );
186
+ }
187
+
174
188
public function testGetDefaultMapBuildFile (): void
175
189
{
176
190
$ this ->assertStringContainsString ('default_map_build.yml ' , MapUpdater::getDefaultMapBuildFile ());
You can’t perform that action at this time.
0 commit comments