diff options
author | Ignace Nyamagana Butera <nyamsprod@gmail.com> | 2015-02-17 10:27:30 +0100 |
---|---|---|
committer | Ignace Nyamagana Butera <nyamsprod@gmail.com> | 2015-02-17 10:52:15 +0100 |
commit | 1b6de5f30379f1fd9e698c68d1ba8a0d5dca59ee (patch) | |
tree | 4d1d499392a1b6f7beb099ecf2e54381ea315a6b /test | |
parent | 4cc2b181d89dcfe39b9111fa6c71951f2b06442d (diff) | |
download | csv-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.php | 5 |
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()); } |