setLogFile(new PathLogFile($this->fixturePath())); $log->parse(); $analysis = $log->analyse(); $this->assertCount(1, $analysis->getFilteredInsights(EngineVersionInformation::class)); $this->assertCount(3, $analysis->getFilteredInsights(ModLoadInformation::class)); $this->assertCount(1, $analysis->getFilteredInsights(ModMissingProblem::class)); $this->assertCount(2, $analysis->getFilteredInsights(ServerExceptionProblem::class)); } public function testAnalysisCarriesAttachedSolutionForMissingMod(): void { $log = (new ProjectZomboidServerLog())->setLogFile(new PathLogFile($this->fixturePath())); $log->parse(); $analysis = $log->analyse(); $missing = $analysis->getFilteredInsights(ModMissingProblem::class); $this->assertCount(1, $missing); $this->assertCount(1, $missing[0]->getSolutions()); } public function testTwoDistinctExceptionsAreNotCoalesced(): void { $log = (new ProjectZomboidServerLog())->setLogFile(new PathLogFile($this->fixturePath())); $log->parse(); $analysis = $log->analyse(); $exceptions = $analysis->getFilteredInsights(ServerExceptionProblem::class); $types = array_map(fn($e) => $e->getExceptionType(), $exceptions); sort($types); $this->assertSame( [ 'java.nio.file.NoSuchFileException', 'zombie.core.properties.IsoPropertyType$IsoPropertyTypeNotFoundException', ], $types ); } }