Skip to content

Commit 0bc5b80

Browse files
committed
refactor: cleanup redundant checks
1 parent b62fea7 commit 0bc5b80

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

tests/ValidatorTest.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use JsonSchema\Validator;
66
use PHPUnit\Framework\TestCase;
7+
use JsonSchema\Exception\InvalidArgumentException;
78

89
class 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

0 commit comments

Comments
 (0)