44
55use Alezhu \PHPUnitArrayContainsAsserts \Constraint \ArrayContains ;
66use PHPUnit \Framework \AssertionFailedError ;
7+ use PHPUnit \Framework \Constraint \IsType ;
78use PHPUnit \Framework \ExpectationFailedException ;
89use PHPUnit \Framework \TestCase ;
910use SebastianBergmann \Exporter \Exporter ;
@@ -36,7 +37,7 @@ public function test_matches_unassoc_should_be_valid_if_all_expected_values_in_r
3637
3738 public function test_matches_assoc_should_be_valid_if_all_expected_values_in_result ()
3839 {
39- $ instance = new ArrayContains (["foo " => self ::isType (" string " ), "bar " => 1 ]);
40+ $ instance = new ArrayContains (["foo " => self ::isType (IsType:: TYPE_STRING ), "bar " => 1 ]);
4041 $ result = $ instance ->evaluate (["bar " => 1 , "foo " => "value " , "baz " => true ], '' , true );
4142 self ::assertTrue ($ result );
4243 }
@@ -79,7 +80,7 @@ public function test_matches_assoc_should_raise_exception_if_some_of_expected_ke
7980 {
8081 $ this ->expectException (ExpectationFailedException::class);
8182 $ result = ["bar " => "value " ];
82- $ instance = new ArrayContains (["foo " => self ::isType (" string " ), "bar " => 1 ]);
83+ $ instance = new ArrayContains (["foo " => self ::isType (IsType:: TYPE_STRING ), "bar " => 1 ]);
8384 $ exporter = new Exporter ();
8485 $ this ->expectExceptionMessage (
8586 sprintf (
@@ -95,7 +96,7 @@ public function test_matches_assoc_should_raise_exception_if_some_of_expected_va
9596 {
9697 $ this ->expectException (ExpectationFailedException::class);
9798 $ result = ["bar " => "value " , "foo " => "value " ];
98- $ instance = new ArrayContains (["foo " => self ::isType (" string " ), "bar " => 1 ]);
99+ $ instance = new ArrayContains (["foo " => self ::isType (IsType:: TYPE_STRING ), "bar " => 1 ]);
99100 $ exporter = new Exporter ();
100101 $ this ->expectExceptionMessage (
101102 sprintf (
0 commit comments