SetTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testTags() 0 4 1
A testSet() 0 4 1
1
<?php
2
/**
3
 * This file is part of graze/dog-statsd
4
 *
5
 * Copyright (c) 2016 Nature Delivered Ltd. <https://www.graze.com>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license https://github.com/graze/dog-statsd/blob/master/LICENSE.md
11
 * @link    https://github.com/graze/dog-statsd
12
 */
13
14
namespace Graze\DogStatsD\Test\Unit;
15
16
use Graze\DogStatsD\Test\TestCase;
17
18
class SetTest extends TestCase
19
{
20
    public function testSet()
21
    {
22
        $this->client->set('test_metric', 456);
23
        $this->assertEquals('test_metric:456|s', $this->client->getLastMessage());
24
    }
25
26
    public function testTags()
27
    {
28
        $this->client->set('test_metric', 456, ['tag']);
29
        $this->assertEquals('test_metric:456|s|#tag', $this->client->getLastMessage());
30
    }
31
}
32