diff options
author | ignace nyamagana butera <nyamsprod@gmail.com> | 2015-10-23 09:44:28 +0200 |
---|---|---|
committer | ignace nyamagana butera <nyamsprod@gmail.com> | 2015-10-23 09:44:28 +0200 |
commit | 426feba9a362320912ddcbadbb77c15e3ce906ec (patch) | |
tree | f3905cfe6f36b6726103e0097b04e42a84b75fee /test/ControlsTest.php | |
parent | cecca13d6207a10a6feea939b18aa67d3eea8c21 (diff) | |
download | csv-426feba9a362320912ddcbadbb77c15e3ce906ec.zip csv-426feba9a362320912ddcbadbb77c15e3ce906ec.tar.gz csv-426feba9a362320912ddcbadbb77c15e3ce906ec.tar.bz2 |
Prepare for 7.2.0 release
- Introduce Controls::fetchDelimitersOccurrences
- Introduce Reader::fetch
- Deprecate Reader::query
- Deprecate Controls::detectDelimiterList
Diffstat (limited to 'test/ControlsTest.php')
-rw-r--r-- | test/ControlsTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/ControlsTest.php b/test/ControlsTest.php index 97cf520..286dd04 100644 --- a/test/ControlsTest.php +++ b/test/ControlsTest.php @@ -49,11 +49,6 @@ class ControlsTest extends PHPUnit_Framework_TestCase $this->csv->setDelimiter('foo'); } - public function testDetectDelimiterList() - { - $this->assertSame([',' => 4], $this->csv->detectDelimiterList()); - } - public function testBOMSettings() { $this->assertNull($this->csv->getOutputBOM()); @@ -97,9 +92,14 @@ class ControlsTest extends PHPUnit_Framework_TestCase $this->assertSame(Reader::BOM_UTF8.$text, $reader->__toString()); } + public function testDetectDelimiterList() + { + $this->assertSame([4 => ','], $this->csv->detectDelimiterList()); + } + /** * @expectedException InvalidArgumentException - * @expectedExceptionMessage `$nb_rows` must be a valid positive integer + * @expectedExceptionMessage The number of rows to consider must be a valid positive integer */ public function testDetectDelimiterListWithInvalidRowLimit() { @@ -125,7 +125,7 @@ class ControlsTest extends PHPUnit_Framework_TestCase $data->fputcsv(['toto', 'tata', 'tutu']); $csv = Writer::createFromFileObject($data); - $this->assertSame(['|' => 12, ';' => 4], $csv->detectDelimiterList(5, ['|'])); + $this->assertSame([12 => '|', 4 => ';'], $csv->detectDelimiterList(5, ['|'])); } /** |