getLogger() public method

Returns a stream instance for logging data on the socket connection.
public getLogger ( ) : Psr\Log\LoggerInterface
return Psr\Log\LoggerInterface
 /**
  * Tests addConnection() with a concrete write stream, where most other
  * tests have it mocked out.
  */
 public function testAddConnectionWithConcreteWriteStream()
 {
     $connection = $this->getMockConnectionForAddConnection();
     $logger = $this->client->getLogger();
     $logger->popHandler();
     $stream = fopen('php://memory', 'w+');
     $handler = new StreamHandler($stream, Logger::DEBUG);
     $handler->setFormatter(new LineFormatter("%message%\r\n"));
     $logger->pushHandler($handler);
     $this->client->setResolver($this->getMockResolver());
     $this->client->addConnection($connection);
     $mask = 'nickname!username@0.0.0.0';
     $expected = "{$mask} PASS :password\r\n{$mask} USER username hostname servername :realname\r\n{$mask} NICK :nickname\r\n";
     fseek($stream, 0);
     $actual = stream_get_contents($stream);
     $this->assertSame($expected, $actual);
 }