Skip to content

Commit

Permalink
Fixing the MonologLogAdapterTest
Browse files Browse the repository at this point in the history
  • Loading branch information
justinrainbow committed Jul 23, 2012
1 parent 91c06ad commit c105b62
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/Presque/Tests/Log/MonologLogAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@ class MonologLogAdapterTest extends TestCase
/**
* @dataProvider getLogLevels
*/
public function testLoggingMessages($level, $expectedLevel)
public function testLoggingMessages($level)
{
$this->logger
->expects($this->once())
->method('addRecord')
->with($this->equalTo($expectedLevel), $this->equalTo("My message"));
->method($level)
->with($this->equalTo("My message"));

$this->adapter->log("My message", $level);
$this->adapter->{$level}("My message");
}

public function getLogLevels()
{
return array(
array(LOG_DEBUG, Logger::DEBUG),
array(LOG_INFO, Logger::INFO),
array(LOG_WARNING, Logger::WARNING),
array(LOG_ERR, Logger::ERROR),
array(LOG_CRIT, Logger::CRITICAL),
array(LOG_ALERT, Logger::ALERT),
array('debug'),
array('info'),
array('warn'),
array('err'),
array('crit'),
array('emerg'),
);
}

Expand Down

0 comments on commit c105b62

Please sign in to comment.