Files
librenms-librenms/tests/unit/PointTest.php
T

30 lines
629 B
PHP
Raw Normal View History

2015-06-19 09:49:58 +02:00
<?php
/**
* Created by PhpStorm.
* User: dmartinez
* Date: 18-6-15
* Time: 17:39
*/
2015-06-23 09:19:24 +02:00
namespace InfluxDB\Test;
2015-06-19 09:49:58 +02:00
2015-06-23 09:19:24 +02:00
use InfluxDB\Point;
2015-06-19 09:49:58 +02:00
class PointTest extends \PHPUnit_Framework_TestCase
{
public function testPointStringRepresentation()
{
$expected = 'cpu_load_short,host=server01,region=us-west cpucount=10,value=0.64 1435222310';
2015-06-19 09:49:58 +02:00
$point = new Point(
2015-06-19 09:49:58 +02:00
'cpu_load_short',
0.64,
array('host' => 'server01', 'region' => 'us-west'),
array('cpucount' => 10),
1435222310
2015-06-19 09:49:58 +02:00
);
$this->assertEquals($expected, (string) $point);
}
}