Files
librenms/lib/influxdb-php-sdk/tests/unit/Adapter/HelpersTest.php
T
laf 0ee83437e3 Add 'lib/influxdb-php-sdk/' from commit '1928d59eb90bfcba40a957074987c5311afd4e3b'
git-subtree-dir: lib/influxdb-php-sdk
git-subtree-mainline: 15a338061d
git-subtree-split: 1928d59eb9
2015-08-09 15:52:58 +00:00

24 lines
643 B
PHP

<?php
namespace InfluxDB\Adapter;
class HelpersTest extends \PHPUnit_Framework_TestCase
{
/**
* @dataProvider getElements
*/
public function testListToInlineValues($message, $result, $escape)
{
$this->assertEquals($result, list_to_string($message, $escape));
}
public function getElements()
{
return [
[["one" => "two"], "one=two", false],
[["one" => "two"], "one=\"two\"", true],
[["one" => "two", "three" => "four"], "one=two,three=four", false],
[["one" => "two", "three" => "four"], "one=\"two\",three=\"four\"", true],
];
}
}