diff options
author | ignace nyamagana butera <nyamsprod@gmail.com> | 2014-05-16 14:47:56 +0200 |
---|---|---|
committer | ignace nyamagana butera <nyamsprod@gmail.com> | 2014-05-16 14:47:56 +0200 |
commit | c2ad46a6b2f67ba9bc092b4ed6ee1ec0c3976d0f (patch) | |
tree | 5149b21f198838fc03bda703e96056312c57f7be /test | |
parent | 62608f0157b58a118072158b16083bfc94816f8b (diff) | |
parent | 2bef289a1ea1da59f4ab58231e51fc1ea6abc37e (diff) | |
download | csv-c2ad46a6b2f67ba9bc092b4ed6ee1ec0c3976d0f.zip csv-c2ad46a6b2f67ba9bc092b4ed6ee1ec0c3976d0f.tar.gz csv-c2ad46a6b2f67ba9bc092b4ed6ee1ec0c3976d0f.tar.bz2 |
Merge pull request #40 from thephpleague/dev
library is restructured using traits
Diffstat (limited to 'test')
-rw-r--r-- | test/CsvTest.php | 2 | ||||
-rw-r--r-- | test/ReaderTest.php | 6 | ||||
-rw-r--r-- | test/WriterTest.php | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/test/CsvTest.php b/test/CsvTest.php index 722b330..cc6c9c7 100644 --- a/test/CsvTest.php +++ b/test/CsvTest.php @@ -248,7 +248,7 @@ EOF; { $this->assertSame(json_encode($this->expected), json_encode($this->csv)); $csv = Reader::createFromString($rawCsv); - $csv->setEncoding('iso-8859-15'); + $csv->setEncodingFrom('iso-8859-15'); json_encode($csv); $this->assertEquals(JSON_ERROR_NONE, json_last_error()); } diff --git a/test/ReaderTest.php b/test/ReaderTest.php index 8e81225..fb3f919 100644 --- a/test/ReaderTest.php +++ b/test/ReaderTest.php @@ -206,7 +206,7 @@ class ReaderTest extends PHPUnit_Framework_TestCase return array_map('strtoupper', $value); }; - $this->assertSame(['JOHN', 'JANE'], $this->csv->fetchCol(0, $func)); + $this->assertSame(['JOHN', 'JANE'], $this->csv->fetchColumn(0, $func)); } /** @@ -214,7 +214,7 @@ class ReaderTest extends PHPUnit_Framework_TestCase */ public function testFetchColFailure() { - $this->csv->fetchCol('toto'); + $this->csv->fetchColumn('toto'); } /** @@ -250,7 +250,7 @@ class ReaderTest extends PHPUnit_Framework_TestCase public function testGetWriter() { - $writer = $this->csv->getWriter(); + $writer = $this->csv->newWriter(); $writer->insertOne(['toto', 'le', 'herisson']); $expected = <<<EOF <table class="table-csv-data"> diff --git a/test/WriterTest.php b/test/WriterTest.php index 95ddd43..ff67e73 100644 --- a/test/WriterTest.php +++ b/test/WriterTest.php @@ -115,7 +115,7 @@ class WriterTest extends PHPUnit_Framework_TestCase } /** - * @expectedException InvalidArgumentException + * @expectedException RuntimeException */ public function testColumsCountConsistency() { @@ -127,7 +127,7 @@ class WriterTest extends PHPUnit_Framework_TestCase } /** - * @expectedException InvalidArgumentException + * @expectedException RuntimeException */ public function testAutoDetectColumnsCount() { |