summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorignace nyamagana butera <nyamsprod@gmail.com>2015-10-21 14:22:07 +0200
committerignace nyamagana butera <nyamsprod@gmail.com>2015-10-21 14:22:07 +0200
commit6f743bfa7c25e3d4180b9dd9948476194da2cfe8 (patch)
treee016d31604e2f1542e67a02e33daf20d565dc6e4 /test
parentcbfc72a07f8c20843153efce08cb955945f3c023 (diff)
downloadcsv-6f743bfa7c25e3d4180b9dd9948476194da2cfe8.zip
csv-6f743bfa7c25e3d4180b9dd9948476194da2cfe8.tar.gz
csv-6f743bfa7c25e3d4180b9dd9948476194da2cfe8.tar.bz2
Bug Fix Spl Flags
- default flag is now SplFileObject::READ_AHEAD|SplFileObject::SKIP_EMPTY - AbstractCsv::__toString is also bug fixed
Diffstat (limited to 'test')
-rw-r--r--test/ControlsTest.php5
-rw-r--r--test/CsvTest.php4
2 files changed, 5 insertions, 4 deletions
diff --git a/test/ControlsTest.php b/test/ControlsTest.php
index f8b8d63..97cf520 100644
--- a/test/ControlsTest.php
+++ b/test/ControlsTest.php
@@ -172,9 +172,10 @@ class ControlsTest extends PHPUnit_Framework_TestCase
public function testSetFlags()
{
$this->assertSame(SplFileObject::READ_CSV, $this->csv->getFlags() & SplFileObject::READ_CSV);
- $this->assertSame(SplFileObject::DROP_NEW_LINE, $this->csv->getFlags() & SplFileObject::DROP_NEW_LINE);
- $this->csv->setFlags(SplFileObject::SKIP_EMPTY);
$this->assertSame(SplFileObject::SKIP_EMPTY, $this->csv->getFlags() & SplFileObject::SKIP_EMPTY);
+ $this->assertSame(SplFileObject::READ_AHEAD, $this->csv->getFlags() & SplFileObject::READ_AHEAD);
+ $this->csv->setFlags(SplFileObject::DROP_NEW_LINE);
+ $this->assertSame(SplFileObject::DROP_NEW_LINE, $this->csv->getFlags() & SplFileObject::DROP_NEW_LINE);
$this->assertSame(SplFileObject::READ_CSV, $this->csv->getFlags() & SplFileObject::READ_CSV);
$this->csv->setFlags(-3);
diff --git a/test/CsvTest.php b/test/CsvTest.php
index 10992cb..b66d96a 100644
--- a/test/CsvTest.php
+++ b/test/CsvTest.php
@@ -79,7 +79,7 @@ class CsvTest extends PHPUnit_Framework_TestCase
*/
public function testOutputSize()
{
- $this->assertSame(60, $this->csv->output('test.csv'));
+ $this->assertSame(60, $this->csv->output(__DIR__.'/data/test.csv'));
}
/**
@@ -87,7 +87,7 @@ class CsvTest extends PHPUnit_Framework_TestCase
*/
public function testOutputHeaders()
{
- if (! function_exists('xdebug_get_headers')) {
+ if (!function_exists('xdebug_get_headers')) {
$this->markTestSkipped();
}
$this->csv->output('test.csv');