summaryrefslogtreecommitdiff
path: root/StatsdDataTest.php
blob: fad9175cb91b135453cd525bd7be5be8998a7c5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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');

    }
}