summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorIgnace Nyamagana Butera <nyamsprod@gmail.com>2014-07-24 12:17:09 +0200
committerIgnace Nyamagana Butera <nyamsprod@gmail.com>2014-07-24 12:17:09 +0200
commit10bb871ed7c7287e746459ca190f771a1c2f00ae (patch)
treef5c3d8b563159da9eedc1a3cea7995da619b9a41 /test
parenta9e304d82d814cc83c78ea2c2939849a3e1e41b9 (diff)
downloadcsv-10bb871ed7c7287e746459ca190f771a1c2f00ae.zip
csv-10bb871ed7c7287e746459ca190f771a1c2f00ae.tar.gz
csv-10bb871ed7c7287e746459ca190f771a1c2f00ae.tar.bz2
update CSV Test
Diffstat (limited to 'test')
-rw-r--r--test/CsvTest.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/test/CsvTest.php b/test/CsvTest.php
index cc6c9c7..7a17eca 100644
--- a/test/CsvTest.php
+++ b/test/CsvTest.php
@@ -34,23 +34,28 @@ class CsvTest extends PHPUnit_Framework_TestCase
$this->csv = new Reader($csv);
}
+ public function testConstructorWithFilePath()
+ {
+ $path = __DIR__.'/foo.csv';
+
+ $csv = new Reader($path);
+ $this->assertSame($path, $csv->getIterator()->getRealPath());
+ }
+
public function testConstructorWithFileObject()
{
$path = __DIR__.'/foo.csv';
$csv = new Reader(new SplFileInfo($path));
$this->assertSame($path, $csv->getIterator()->getRealPath());
-
- $csv = new Reader(new SplFileInfo('php://input'));
- $this->assertFalse($csv->getIterator()->getRealPath());
}
- public function testConstructorWithFilePath()
+ public function testContructorWithPHPWrapper()
{
$path = __DIR__.'/foo.csv';
- $csv = new Reader($path);
- $this->assertSame($path, $csv->getIterator()->getRealPath());
+ $csv = new Reader('php://filter/read=string.toupper/resource='.$path);
+ $this->assertFalse($csv->getIterator()->getRealPath());
}
/**