Skip to content
Browse files

Added assertions for test cases

  • Loading branch information...
1 parent 134145e commit f39f9d6a34a0147e175c2f0fa0264b85b2741502 @JanMalte JanMalte committed Dec 5, 2013
Showing with 13 additions and 1 deletion.
  1. +13 −1 Psr/Log/Test/LoggerInterfaceTest.php
View
14 Psr/Log/Test/LoggerInterfaceTest.php
@@ -86,6 +86,9 @@ public function testObjectCastToString()
->will($this->returnValue('DUMMY'));
$this->getLogger()->warning($dummy);
+
+ $expected = array('warning DUMMY');
+ $this->assertEquals($expected, $this->getLogs());
}
public function testContextCanContainAnything()
@@ -102,15 +105,24 @@ public function testContextCanContainAnything()
);
$this->getLogger()->warning('Crazy context data', $context);
+
+ $expected = array('warning Crazy context data');
+ $this->assertEquals($expected, $this->getLogs());
}
public function testContextExceptionKeyCanBeExceptionOrOtherValues()
{
$this->getLogger()->warning('Random message', array('exception' => 'oops'));
$this->getLogger()->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail')));
+
+ $expected = array(
+ 'warning Random message',
+ 'Uncaught Exception!'
+ );
+ $this->assertEquals($expected, $this->getLogs());
}
}
class DummyTest
{
-}
+}

0 comments on commit f39f9d6

Please sign in to comment.
Something went wrong with that request. Please try again.