Skip to content

Commit

Permalink
issue spresnac#11 - add unit tests
Browse files Browse the repository at this point in the history
* refactored a little bit
  • Loading branch information
dangenendt committed Oct 9, 2019
1 parent 24bec93 commit 0325911
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/spresnac/logcrawlerclient/Handler/LogCrawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

use Monolog\Logger;
use Monolog\Handler\AbstractSyslogHandler;
use spresnac\logcrawlerclient\Request\LogCrawlerCurlRequest;

class LogCrawler extends AbstractSyslogHandler
{
/** @var CurlRequest */
/** @var LogCrawlerCurlRequest */
private $curlRequest;

/** @var int */
Expand All @@ -29,7 +30,7 @@ class LogCrawler extends AbstractSyslogHandler
private $queue = [];

public function __construct(
CurlRequest $curlRequest,
LogCrawlerCurlRequest $curlRequest,
$facility = LOG_USER,
$level = Logger::DEBUG,
bool $bubble = true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace spresnac\logcrawlerclient\Handler;
namespace spresnac\logcrawlerclient\Request;

class CurlRequest
class LogCrawlerCurlRequest
{
const API_LOG_ROUTE = '/api/log';
const CURL_TIME_OUT = 10;
Expand Down

0 comments on commit 0325911

Please sign in to comment.