mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
29 lines
589 B
PHP
29 lines
589 B
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: dmartinez
|
|
* Date: 18-6-15
|
|
* Time: 17:39
|
|
*/
|
|
|
|
namespace InfluxDB\Test;
|
|
|
|
|
|
use InfluxDB\Point;
|
|
|
|
class PointTest extends \PHPUnit_Framework_TestCase
|
|
{
|
|
public function testPointStringRepresentation()
|
|
{
|
|
$expected = 'cpu_load_short,host=server01,region=us-west value=0.64 myTime';
|
|
|
|
$point = new Point(
|
|
'cpu_load_short',
|
|
array('host' =>'server01', 'region'=>'us-west'),
|
|
array('value' => 0.64),
|
|
'myTime'
|
|
);
|
|
|
|
$this->assertEquals($expected, (string) $point);
|
|
}
|
|
} |