File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 44
55use JsonSchema \Validator ;
66use PHPUnit \Framework \TestCase ;
7+ use JsonSchema \Exception \InvalidArgumentException ;
78
89class ValidatorTest extends TestCase
910{
@@ -31,18 +32,12 @@ public function testValidateWithAssocSchemaWithRelativeRefs(): void
3132
3233 public function testBadAssocSchemaInput (): void
3334 {
34- if (version_compare (phpversion (), '5.5.0 ' , '< ' )) {
35- $ this ->markTestSkipped ('PHP versions < 5.5.0 trigger an error on json_encode issues ' );
36- }
37- if (defined ('HHVM_VERSION ' )) {
38- $ this ->markTestSkipped ('HHVM has no problem with encoding resources ' );
39- }
40- $ schema = ['propertyOne ' => fopen ('php://stdout ' , 'w ' )];
35+ $ schema = ['propertyOne ' => fopen ('php://stdout ' , 'wb ' )];
4136 $ data = json_decode ('{"propertyOne":[42]} ' , true );
4237
4338 $ validator = new Validator ();
4439
45- $ this ->expectException (' \JsonSchema\Exception\ InvalidArgumentException' );
40+ $ this ->expectException (InvalidArgumentException::class );
4641 $ validator ->validate ($ data , $ schema );
4742 }
4843
You can’t perform that action at this time.
0 commit comments