@@ -44,6 +44,7 @@ class FactorioExecutionServiceTest extends TestCase
4444 private ModFileService $ modFileService ;
4545 private string $ factorioDirectory = 'foo ' ;
4646 private string $ instancesDirectory = 'bar ' ;
47+ private string $ logsDirectory = 'baz ' ;
4748 private string $ version = '1.2.3 ' ;
4849
4950 protected function setUp (): void
@@ -69,14 +70,17 @@ private function createInstance(array $mockedMethods = []): FactorioExecutionSer
6970 $ this ->modFileService ,
7071 'src ' ,
7172 'test ' ,
73+ 'test/asset ' ,
7274 $ this ->version ,
7375 ])
7476 ->getMock ();
7577
7678 $ this ->assertSame (realpath ('src ' ), $ this ->extractProperty ($ instance , 'factorioDirectory ' ));
7779 $ this ->assertSame (realpath ('test ' ), $ this ->extractProperty ($ instance , 'instancesDirectory ' ));
80+ $ this ->assertSame (realpath ('test/asset ' ), $ this ->extractProperty ($ instance , 'logsDirectory ' ));
7881 $ this ->injectProperty ($ instance , 'factorioDirectory ' , $ this ->factorioDirectory );
7982 $ this ->injectProperty ($ instance , 'instancesDirectory ' , $ this ->instancesDirectory );
83+ $ this ->injectProperty ($ instance , 'logsDirectory ' , $ this ->logsDirectory );
8084
8185 return $ instance ;
8286 }
@@ -341,6 +345,13 @@ public function testCleanup(): void
341345 {
342346 $ combinationId = 'abc ' ;
343347
348+ $ this ->fileSystem ->expects ($ this ->once ())
349+ ->method ('copy ' )
350+ ->with (
351+ $ this ->identicalTo ('bar/abc/factorio-current.log ' ),
352+ $ this ->identicalTo ('baz/factorio_abc.log ' ),
353+ );
354+
344355 $ this ->fileSystem ->expects ($ this ->once ())
345356 ->method ('remove ' )
346357 ->with ($ this ->identicalTo ('bar/abc ' ));
0 commit comments