Skip to content

Commit

Permalink
Remove unused mock class
Browse files Browse the repository at this point in the history
  • Loading branch information
Hectorhammett committed Dec 11, 2024
1 parent 1df9dec commit 561d198
Showing 1 changed file with 3 additions and 24 deletions.
27 changes: 3 additions & 24 deletions tests/Logging/LoggingTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct()
public function testLogRequest()
{
$event = $this->getNewLogEvent();
$this->loggerContainer->logRequestEvent($event);
$this->loggerContainer->logRequest($event);

$buffer = $this->getActualOutput();
$jsonParsed = json_decode($buffer, true);
Expand All @@ -64,7 +64,7 @@ public function testRequestWithoutJwtShouldNotPrintAJwt()
{
$event = $this->getNewLogEvent();
$event->headers = ['no jwt' => true];
$this->loggerContainer->logRequestEvent($event);
$this->loggerContainer->logRequest($event);

$buffer = $this->getActualOutput();
$jsonParsed = json_decode($buffer, true);
Expand All @@ -76,7 +76,7 @@ public function testLogResponse()
{
$event = $this->getNewLogEvent();
$event->headers = ['Thisis' => 'a header'];
$this->loggerContainer->logResponseEvent($event);
$this->loggerContainer->logResponse($event);

$buffer = $this->getActualOutput();

Expand Down Expand Up @@ -107,24 +107,3 @@ private function getNewLogEvent(): RpcLogEvent
return $event;
}
}

class MockClassWithLogger
{
use LoggingTrait;
private LoggerInterface $logger;

public function __construct()
{
$this->logger = new StdOutLogger();
}

public function logRequestEvent(RpcLogEvent $event): void
{
$this->logRequest($event);
}

public function logResponseEvent(RpcLogEvent $event): void
{
$this->logResponse($event);
}
}

0 comments on commit 561d198

Please sign in to comment.