ResultSet - implementing getPoints

This commit is contained in:
Daniel Martinez
2015-06-17 16:03:21 +02:00
parent 0986f43bdd
commit d6dc5d5062
3 changed files with 107 additions and 10 deletions

View File

@@ -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)
);
}
}