summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ControlsTest.php14
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, ['|']));
}
/**