mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
24 lines
643 B
PHP
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],
|
|
];
|
|
}
|
|
}
|