Legend attribute
This commit is contained in:
parent
b806c85932
commit
d4fa62cea9
|
@ -63,6 +63,8 @@ class Csv
|
||||||
{
|
{
|
||||||
$this->setHasLegend(true);
|
$this->setHasLegend(true);
|
||||||
|
|
||||||
|
$this->legend = $values;
|
||||||
|
|
||||||
$this->addLine($values, 0);
|
$this->addLine($values, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,10 @@ class CsvTest extends \PHPUnit_Framework_TestCase
|
||||||
|
|
||||||
$this->assertEquals(false, $csv->getHasLegend());
|
$this->assertEquals(false, $csv->getHasLegend());
|
||||||
|
|
||||||
$csv->setLegend(array('bim', 'bam'));
|
$csv->setLegend($a = array('bim', 'bam'));
|
||||||
|
|
||||||
|
$this->assertEquals($a, $csv->getLegend());
|
||||||
|
|
||||||
$csv->addLine(array('foo', 'bar'));
|
$csv->addLine(array('foo', 'bar'));
|
||||||
|
|
||||||
$this->assertEquals(true, $csv->getHasLegend());
|
$this->assertEquals(true, $csv->getHasLegend());
|
||||||
|
|
Loading…
Reference in a new issue