diff options
author | Ignace Nyamagana Butera <nyamsprod@gmail.com> | 2015-02-11 09:48:40 +0100 |
---|---|---|
committer | Ignace Nyamagana Butera <nyamsprod@gmail.com> | 2015-02-11 09:48:40 +0100 |
commit | 07ead911c23e462739b39293d4ef5a48f7891389 (patch) | |
tree | 91965328e069f8b10ab5542e7261e67329792324 /test | |
parent | b5c7ff95e74968f12a8284c5caf9fb8695fdf279 (diff) | |
download | csv-07ead911c23e462739b39293d4ef5a48f7891389.zip csv-07ead911c23e462739b39293d4ef5a48f7891389.tar.gz csv-07ead911c23e462739b39293d4ef5a48f7891389.tar.bz2 |
deprecated default constructors
Diffstat (limited to 'test')
-rw-r--r-- | test/CsvTest.php | 10 | ||||
-rw-r--r-- | test/FactoryTest.php | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/test/CsvTest.php b/test/CsvTest.php index 5ee00c5..877679c 100644 --- a/test/CsvTest.php +++ b/test/CsvTest.php @@ -131,12 +131,12 @@ EOF; */ public function testInitStreamFilterWithSplFileObject() { - (new Reader(new SplFileObject(__DIR__.'/foo.csv')))->getStreamFilterMode(); + Reader::createFromFileObject(new SplFileObject(__DIR__.'/foo.csv'))->getStreamFilterMode(); } public function testappendStreamFilter() { - $csv = new Reader(__DIR__.'/foo.csv'); + $csv = Reader::createFromPath(__DIR__.'/foo.csv'); $csv->appendStreamFilter('string.toupper'); $csv->setFlags(SplFileObject::READ_AHEAD|SplFileObject::SKIP_EMPTY); foreach ($csv->getIterator() as $row) { @@ -150,7 +150,7 @@ EOF; */ public function testFailedprependStreamFilter() { - $csv = new Reader(new SplTempFileObject()); + $csv = Reader::createFromFileObject(new SplTempFileObject()); $this->assertFalse($csv->isActiveStreamFilter()); $csv->prependStreamFilter('string.toupper'); } @@ -161,7 +161,7 @@ EOF; */ public function testFailedapppendStreamFilter() { - $csv = new Writer(new SplTempFileObject()); + $csv = Writer::createFromFileObject(new SplTempFileObject()); $this->assertFalse($csv->isActiveStreamFilter()); $csv->appendStreamFilter('string.toupper'); } @@ -199,7 +199,7 @@ EOF; public function testGetFilterPath() { - $csv = new Writer(__DIR__.'/foo.csv'); + $csv = Writer::createFromPath(__DIR__.'/foo.csv'); $csv->appendStreamFilter('string.rot13'); $csv->prependStreamFilter('string.toupper'); $this->assertFalse($csv->getIterator()->getRealPath()); diff --git a/test/FactoryTest.php b/test/FactoryTest.php index 898e683..9aabb09 100644 --- a/test/FactoryTest.php +++ b/test/FactoryTest.php @@ -34,7 +34,7 @@ class FactoryTest extends PHPUnit_Framework_TestCase public function testConstructorWithSplFileInfo() { $path = __DIR__.'/foo.csv'; - $csv = new Reader(new SplFileInfo($path)); + $csv = Reader::createFromPath(new SplFileInfo($path)); $this->assertSame($path, $csv->getIterator()->getRealPath()); } |