summaryrefslogtreecommitdiff
path: root/StatsdDataTest.php
diff options
context:
space:
mode:
authorwiki <wiki@proton.parabola.nu>2016-08-02 21:10:30 +0100
committerwiki <wiki@proton.parabola.nu>2016-08-02 21:10:30 +0100
commitd386934962c15a79703588812dc5815f32d70cbf (patch)
tree1251b086744a5305855c107eacbcf3e96005ab6e /StatsdDataTest.php
parenta5f917bbc55e295896b8084f6657eb8b6abaf8a8 (diff)
files were sitting here on productionemulatorman/master
Diffstat (limited to 'StatsdDataTest.php')
-rw-r--r--StatsdDataTest.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/StatsdDataTest.php b/StatsdDataTest.php
new file mode 100644
index 00000000..fad9175c
--- /dev/null
+++ b/StatsdDataTest.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace Liuggio\StatsdClient\Entity;
+
+use Liuggio\StatsdClient\Entity\StatsdData;
+
+
+class StatsdDataTest extends \PHPUnit_Framework_TestCase
+{
+ public function testGetMessage()
+ {
+ $statsdData = new StatsdData();
+ $statsdData->setKey('key');
+ $statsdData->setValue('value');
+ $statsdData->setMetric('c');
+
+ $this->assertEquals($statsdData->getMessage(), 'key:value|c');
+
+ $statsdData = new StatsdData();
+ $statsdData->setKey('key');
+ $statsdData->setValue(-1);
+ $statsdData->setMetric('c');
+
+ $this->assertEquals($statsdData->getMessage(), 'key:-1|c');
+
+ }
+}