mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-09-21 17:07:53 +02:00
parent
1d4c327437
commit
a7988a08aa
@ -6,6 +6,7 @@ namespace Tests\Icinga\File;
|
|||||||
use Icinga\Data\DataArray\ArrayDatasource;
|
use Icinga\Data\DataArray\ArrayDatasource;
|
||||||
use Icinga\File\Csv;
|
use Icinga\File\Csv;
|
||||||
use Icinga\Test\BaseTestCase;
|
use Icinga\Test\BaseTestCase;
|
||||||
|
use Icinga\Util\Buffer;
|
||||||
|
|
||||||
class CsvTest extends BaseTestCase
|
class CsvTest extends BaseTestCase
|
||||||
{
|
{
|
||||||
@ -16,8 +17,6 @@ class CsvTest extends BaseTestCase
|
|||||||
array('col1' => 'val5', 'col2' => 'val6', 'col3' => 'val7', 'col4' => 'val8')
|
array('col1' => 'val5', 'col2' => 'val6', 'col3' => 'val7', 'col4' => 'val8')
|
||||||
));
|
));
|
||||||
|
|
||||||
$csv = Csv::fromQuery($data->select());
|
|
||||||
|
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
implode(
|
implode(
|
||||||
"\r\n",
|
"\r\n",
|
||||||
@ -27,7 +26,7 @@ class CsvTest extends BaseTestCase
|
|||||||
'"val5","val6","val7","val8"'
|
'"val5","val6","val7","val8"'
|
||||||
)
|
)
|
||||||
) . "\r\n",
|
) . "\r\n",
|
||||||
(string) $csv,
|
(string) Csv::queryToStream($data->select(), new Buffer()),
|
||||||
'Csv does not render valid/correct csv structured data'
|
'Csv does not render valid/correct csv structured data'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user