Explorar o código

Added a test for Tags

ipsq %!s(int64=11) %!d(string=hai) anos
pai
achega
ef0a44f8e0
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  1. 12 0
      tests/Monolog/Handler/RavenHandlerTest.php

+ 12 - 0
tests/Monolog/Handler/RavenHandlerTest.php

@@ -72,6 +72,18 @@ class RavenHandlerTest extends TestCase
         $this->assertEquals($ravenClient::WARNING, $ravenClient->lastData['level']);
         $this->assertContains($record['message'], $ravenClient->lastData['message']);
     }
+    
+    public function testTag()
+    {
+        $ravenClient = $this->getRavenClient();
+        $handler = $this->getHandler($ravenClient);
+
+        $tags = array('tags' => array(1, 2, 'foo'));
+        $record = $this->getRecord(Logger::INFO, "test", $tags);
+        $handler->handle($record);
+
+        $this->assertEquals($record['tags'], $tags);
+    }
 
     public function testException()
     {