Skip to content

Commit

Permalink
Added multiline test for #2
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Jan 9, 2018
1 parent 8ffd013 commit 42143b6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/StdioLoggerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ public function testWriteHideLevel()
(new StdioLogger($stdio->reveal()))->withHideLevel(true)->log($level, $message);
}

public function testWriteMultiline()
{
$level = LogLevel::INFO;
$message = "a\r\nd\r\na\rs\na\r\nd\r\ns";

$stdio = $this->prophesize(WritableStreamInterface::class);
$stdio->write($level . ' ' . $message)->shouldBeCalled();

(new StdioLogger($stdio->reveal()))->log($level, $message);
}

public function testImplements()
{
self::assertInstanceOf(LoggerInterface::class, StdioLogger::create(Factory::create()));
Expand Down

0 comments on commit 42143b6

Please sign in to comment.