summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorIgnace Nyamagana Butera <nyamsprod@gmail.com>2014-01-14 13:22:39 +0100
committerIgnace Nyamagana Butera <nyamsprod@gmail.com>2014-01-14 13:22:39 +0100
commitcec42302e0eab1afa4203907b1cb749bc42919dc (patch)
tree3a9784e49aa3a2df49bbc191392444424b8d27fe /test
parenteaba6681ae03d4f2dce03263e20f0527aa0b473e (diff)
downloadcsv-cec42302e0eab1afa4203907b1cb749bc42919dc.zip
csv-cec42302e0eab1afa4203907b1cb749bc42919dc.tar.gz
csv-cec42302e0eab1afa4203907b1cb749bc42919dc.tar.bz2
Adding Countable and ArrayAccess Interval to Bakame\Csv\Reader
Diffstat (limited to 'test')
-rw-r--r--test/Bakame/Csv/ReaderTest.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Bakame/Csv/ReaderTest.php b/test/Bakame/Csv/ReaderTest.php
index c687287..bc18237 100644
--- a/test/Bakame/Csv/ReaderTest.php
+++ b/test/Bakame/Csv/ReaderTest.php
@@ -189,4 +189,27 @@ class ReaderTest extends \PHPUnit_Framework_TestCase
$this->assertCount(1, $res);
$this->assertSame($this->expected[1], $res[0]);
}
+
+ public function testCountable()
+ {
+ $this->assertCount(count($this->expected), $this->csv);
+ }
+
+ /**
+ * @expectedException \RuntimeException
+ */
+ public function testArrayAccess()
+ {
+ $this->assertSame($this->expected[0], $this->csv[0]);
+ $this->assertTrue(isset($this->csv[0]));
+ $this->csv[3] = "fdsfqsfdsf";
+ }
+
+ /**
+ * @expectedException \RuntimeException
+ */
+ public function testArrayAccessFailure()
+ {
+ unset($this->csv[3]);
+ }
}