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 7
7
use PDOStatement ;
8
8
use Tests \Doubles \InvalidModel ;
9
9
use Illuminate \Database \SQLiteConnection ;
10
+ use Illuminate \Validation \ValidationException ;
10
11
use Illuminate \Database \ConnectionResolverInterface ;
11
12
use Illuminate \Database \Eloquent \Model as EloquentModel ;
12
13
use Jaspaul \EloquentModelValidation \Contracts \Validatable ;
@@ -35,20 +36,18 @@ public function testGetErrorsReturnsAMessageBagWithTheEmailKey()
35
36
$ this ->assertTrue ($ errors ->has ('email ' ));
36
37
}
37
38
38
- /**
39
- * @expectedException \Illuminate\Validation\ValidationException
40
- */
41
39
public function testSaveThrowsAValidationException ()
42
40
{
41
+ $ this ->expectException (ValidationException::class);
42
+
43
43
$ model = new InvalidModel ();
44
44
$ model ->save ();
45
45
}
46
46
47
- /**
48
- * @expectedException \Illuminate\Validation\ValidationException
49
- */
50
47
public function testValidateThrowsAValidationException ()
51
48
{
49
+ $ this ->expectException (ValidationException::class);
50
+
52
51
$ model = new InvalidModel ();
53
52
$ model ->validate ();
54
53
}
You can’t perform that action at this time.
0 commit comments