mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Reverted guzzle to v.5 to support php 5.4, increased verbosity and improved internal api; improved readme
This commit is contained in:
@@ -38,15 +38,15 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$point1 = new Point(
|
||||
'cpu_load_short',
|
||||
array('host' =>'server01', 'region'=>'us-west'),
|
||||
array('value' => 0.64),
|
||||
'myTime'
|
||||
0.64,
|
||||
array('host' => 'server01', 'region' => 'us-west'),
|
||||
array('cpucount' => 10),
|
||||
1435222310
|
||||
);
|
||||
|
||||
$point2 = new Point(
|
||||
'cpu_load_short',
|
||||
array('host' =>'server01', 'region'=>'us-west'),
|
||||
array('value' => 0.84),
|
||||
'myTime'
|
||||
0.84
|
||||
);
|
||||
|
||||
$payloadExpected ="$point1\n$point2";
|
||||
|
||||
@@ -15,13 +15,14 @@ class PointTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testPointStringRepresentation()
|
||||
{
|
||||
$expected = 'cpu_load_short,host=server01,region=us-west value=0.64 myTime';
|
||||
$expected = 'cpu_load_short,host=server01,region=us-west cpucount=10,value=0.64 1435222310';
|
||||
|
||||
$point = new Point(
|
||||
$point = new Point(
|
||||
'cpu_load_short',
|
||||
array('host' =>'server01', 'region'=>'us-west'),
|
||||
array('value' => 0.64),
|
||||
'myTime'
|
||||
0.64,
|
||||
array('host' => 'server01', 'region' => 'us-west'),
|
||||
array('cpucount' => 10),
|
||||
1435222310
|
||||
);
|
||||
|
||||
$this->assertEquals($expected, (string) $point);
|
||||
|
||||
Reference in New Issue
Block a user