setLogFile(new PathLogFile($this->fixturePath())); $log->parse(); $this->assertCount(5, $log->getEntries()); } public function testLevelAndPrefixAreParsed(): void { $log = (new ProjectZomboidBurdJournalsLog())->setLogFile(new PathLogFile($this->fixturePath())); $log->parse(); $first = $log->getEntries()[0]; $this->assertSame(Level::WARNING, $first->getLevel()); $this->assertSame('BurdJournals', $first->getPrefix()); } public function testDetectiveDispatchesByContent(): void { $detective = (new Detective()) ->setLogFile(new PathLogFile($this->fixturePath())) ->addPossibleLogClass(ProjectZomboidBurdJournalsLog::class); $this->assertInstanceOf(ProjectZomboidBurdJournalsLog::class, $detective->detect()); } }