mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
ResultSet - implementing getPoints
This commit is contained in:
@@ -1,12 +1,27 @@
|
||||
<?php
|
||||
namespace Leaseweb\InfluxDB\Test;
|
||||
|
||||
use Leaseweb\InfluxDB\ResultSet;
|
||||
|
||||
class ResultSetTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testResultSetFromRaw()
|
||||
/** @var ResultSet $resultSet*/
|
||||
protected $resultSet;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
$resultJsonExample = file_get_contents(dirname(__FILE__) . '/result.example.json');
|
||||
$this->resultSet = new ResultSet($resultJsonExample);
|
||||
}
|
||||
|
||||
public function testGetPointsFromMeasurementName()
|
||||
{
|
||||
$measurementName = 'cpu_load_short';
|
||||
|
||||
$points = $this->resultSet->getPoints($measurementName);
|
||||
|
||||
$this->assertTrue(
|
||||
false
|
||||
is_array($points)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user