/** * @param string $logFile * * @return StreamHandler */ private function getLogStream($logFile) { if (!isset($this->logStreams[$logFile])) { $handler = new StreamHandler($logFile, $this->filePermission, $this->useLocking); $handler->setFormatter($this->getFormatter()); $this->logStreams[$logFile] = $handler; } return $this->logStreams[$logFile]; }
/** * @expectedException \Exception * @expectedExceptionMessageRegExp /There is no existing directory at/ * @covers Scheb\Tombstone\Handler\StreamHandler::__construct * @covers Scheb\Tombstone\Handler\StreamHandler::log */ public function testWriteNonExistingAndNotCreatableFileResource() { if (defined('PHP_WINDOWS_VERSION_BUILD')) { $this->markTestSkipped('Permissions checks can not run on windows'); } $handler = new StreamHandler('file:///foo/bar/' . rand(0, 10000) . DIRECTORY_SEPARATOR . rand(0, 10000)); $handler->log($this->getRecord()); }