File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 77use PDOStatement ;
88use Tests \Doubles \InvalidModel ;
99use Illuminate \Database \SQLiteConnection ;
10+ use Illuminate \Validation \ValidationException ;
1011use Illuminate \Database \ConnectionResolverInterface ;
1112use Illuminate \Database \Eloquent \Model as EloquentModel ;
1213use Jaspaul \EloquentModelValidation \Contracts \Validatable ;
@@ -35,20 +36,18 @@ public function testGetErrorsReturnsAMessageBagWithTheEmailKey()
3536 $ this ->assertTrue ($ errors ->has ('email ' ));
3637 }
3738
38- /**
39- * @expectedException \Illuminate\Validation\ValidationException
40- */
4139 public function testSaveThrowsAValidationException ()
4240 {
41+ $ this ->expectException (ValidationException::class);
42+
4343 $ model = new InvalidModel ();
4444 $ model ->save ();
4545 }
4646
47- /**
48- * @expectedException \Illuminate\Validation\ValidationException
49- */
5047 public function testValidateThrowsAValidationException ()
5148 {
49+ $ this ->expectException (ValidationException::class);
50+
5251 $ model = new InvalidModel ();
5352 $ model ->validate ();
5453 }
You can’t perform that action at this time.
0 commit comments