/** * Get handlers. * * @return HandlerInterface[] */ public function getHandlers() { if (null === $this->handlers) { $handlers = []; $path = $this->config->getLogFilePath(); if (null !== $path) { $handlers[] = new StreamHandler($path); } $this->handlers = $handlers; } return $this->handlers; }
/** * Test that the expected custom values are returned. */ public function testCustomConfigValues() { $config = new Config(); $config->setDatabaseFilePath('/path/to/database.file'); $config->setCacheDirectory('/cache/directory'); $config->setLogFilePath('/path/to/log.file'); $config->setProcessTimeout(Config::DEFAULT_PROCESS_TIMEOUT + 10); $this->assertSame('/path/to/database.file', $config->getDatabaseFilePath()); $this->assertSame('/cache/directory', $config->getCacheDirectory()); $this->assertSame('/path/to/log.file', $config->getLogFilePath()); $this->assertSame(Config::DEFAULT_PROCESS_TIMEOUT + 10, $config->getProcessTimeout()); }