Skip to content

Commit

Permalink
Merge branch '3.0'
Browse files Browse the repository at this point in the history
* 3.0:
  [Process] Fix stopping a process on Windows
  [PhpUnitBridge] Add weak-verbose mode and match against message instead of test name
  Added a note about the new requirement iconv.
  Improved error messages for Yaml Deprecations
  Added a test case for the Logger class.
  [Form] Fix choices defined as Traversable
  CS: general fixes
  Suggested Process dependency
  • Loading branch information
stof committed Dec 5, 2015
2 parents 3b60d68 + f1ded96 commit 94e6186
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Tests/LoggerTest.php
Expand Up @@ -53,6 +53,19 @@ public function testCountErrorsWithDebugHandler()
$this->assertSame(4, $logger->countErrors());
}

public function testGetLogs()
{
$logger = new Logger('test');
$logger->pushHandler(new DebugHandler());

$logger->addInfo('test');
$this->assertCount(1, $logger->getLogs());
list($record) = $logger->getLogs();

$this->assertEquals('test', $record['message']);
$this->assertEquals(Logger::INFO, $record['priority']);
}

public function testCountErrorsWithoutDebugHandler()
{
$handler = new TestHandler();
Expand Down

0 comments on commit 94e6186

Please sign in to comment.