summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorIgnace Nyamagana Butera <nyamsprod@gmail.com>2015-02-17 10:27:30 +0100
committerIgnace Nyamagana Butera <nyamsprod@gmail.com>2015-02-17 10:52:15 +0100
commit1b6de5f30379f1fd9e698c68d1ba8a0d5dca59ee (patch)
tree4d1d499392a1b6f7beb099ecf2e54381ea315a6b /test
parent4cc2b181d89dcfe39b9111fa6c71951f2b06442d (diff)
downloadcsv-1b6de5f30379f1fd9e698c68d1ba8a0d5dca59ee.zip
csv-1b6de5f30379f1fd9e698c68d1ba8a0d5dca59ee.tar.gz
csv-1b6de5f30379f1fd9e698c68d1ba8a0d5dca59ee.tar.bz2
adding Specific exception for Writer validation
Diffstat (limited to 'test')
-rw-r--r--test/Exporter/NullValidatorTest.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/Exporter/NullValidatorTest.php b/test/Exporter/NullValidatorTest.php
index d9d89bc..8c0fc71 100644
--- a/test/Exporter/NullValidatorTest.php
+++ b/test/Exporter/NullValidatorTest.php
@@ -3,8 +3,9 @@
namespace League\Csv\Test\Exporter;
use InvalidArgumentException;
-use League\Csv\Writer;
+use League\Csv\Exception\ValidationException;
use League\Csv\Exporter\NullValidator;
+use League\Csv\Writer;
use PHPUnit_Framework_TestCase;
use SplFileObject;
use SplTempFileObject;
@@ -37,7 +38,7 @@ class NullValidatorTest extends PHPUnit_Framework_TestCase
$this->csv->addValidator($validator, $validator_name);
try {
$this->csv->insertOne($expected);
- } catch (InvalidArgumentException $e) {
+ } catch (ValidationException $e) {
$this->assertSame($validator_name, $this->csv->getLastValidatorErrorName());
$this->assertSame($expected, $this->csv->getLastValidatorErrorData());
}