summaryrefslogtreecommitdiffstats
path: root/test/ReaderTest.php
diff options
context:
space:
mode:
authorignace nyamagana butera <nyamsprod@gmail.com>2015-11-27 09:33:46 +0100
committerignace nyamagana butera <nyamsprod@gmail.com>2015-11-27 10:26:09 +0100
commita94b152004b070cccf3a6cb669f247a6bd764bd6 (patch)
tree6388fbb85454fb1542666c94a5c45fcf37a03204 /test/ReaderTest.php
parent0274c0fd79e0ba4ed98de3b0c4fc383aae014e63 (diff)
downloadcsv-a94b152004b070cccf3a6cb669f247a6bd764bd6.zip
csv-a94b152004b070cccf3a6cb669f247a6bd764bd6.tar.gz
csv-a94b152004b070cccf3a6cb669f247a6bd764bd6.tar.bz2
Improve returnType reset
Diffstat (limited to 'test/ReaderTest.php')
-rw-r--r--test/ReaderTest.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/ReaderTest.php b/test/ReaderTest.php
index b2ecb6a..893df93 100644
--- a/test/ReaderTest.php
+++ b/test/ReaderTest.php
@@ -606,12 +606,18 @@ class ReaderTest extends AbstractTestCase
$this->csv->setReturnType(Reader::TYPE_ITERATOR);
$this->assertInstanceof('\Iterator', $this->csv->fetchAssoc());
$this->assertInternalType('array', $this->csv->fetchAssoc());
+ $this->csv->setReturnType(Reader::TYPE_ITERATOR);
+ $this->csv->toXML();
+ $this->assertInternalType('array', $this->csv->fetchAssoc());
}
public function testReturnTypeResetBetweenCallToArrayWithFetchPairs()
{
$this->csv->setReturnType(Reader::TYPE_ITERATOR);
- $this->assertInstanceof('\Iterator', $this->csv->fetchAssoc());
- $this->assertInternalType('array', $this->csv->fetchAssoc());
+ $this->assertInstanceof('\Iterator', $this->csv->fetchPairs());
+ $this->assertInternalType('array', $this->csv->fetchPairs());
+ $this->csv->setReturnType(Reader::TYPE_ITERATOR);
+ $this->csv->toXML();
+ $this->assertInternalType('array', $this->csv->fetchPairs());
}
}