diff --git a/tests/cases/AdditionalPropertiesTest.php b/tests/JsonSchema/Tests/AdditionalPropertiesTest.php similarity index 99% rename from tests/cases/AdditionalPropertiesTest.php rename to tests/JsonSchema/Tests/AdditionalPropertiesTest.php index 32397d7..88ff2e7 100644 --- a/tests/cases/AdditionalPropertiesTest.php +++ b/tests/JsonSchema/Tests/AdditionalPropertiesTest.php @@ -1,5 +1,7 @@ assertEquals($errors, $result->errors, var_export($result, true)); } $this->assertFalse($result->valid, var_export($result, true)); } - + /** * @dataProvider getValidTests */ public function testValidCases($input, $schema, $checkMode = null) - { + { if (null === $checkMode) { $checkMode = JsonSchema::CHECK_MODE_NORMAL; } - + JsonSchema::$checkMode = $checkMode; - + $result = JsonSchema::validate(json_decode($input), json_decode($schema)); $this->assertTrue($result->valid, var_export($result, true)); } - + abstract public function getValidTests(); - + abstract public function getInvalidTests(); } \ No newline at end of file diff --git a/tests/cases/BasicTypesTest.php b/tests/JsonSchema/Tests/BasicTypesTest.php similarity index 95% rename from tests/cases/BasicTypesTest.php rename to tests/JsonSchema/Tests/BasicTypesTest.php index 2902629..c226466 100644 --- a/tests/cases/BasicTypesTest.php +++ b/tests/JsonSchema/Tests/BasicTypesTest.php @@ -1,12 +1,14 @@ registerNamespace('JsonSchema', __DIR__.'/../src'); +$loader->registerNamespace('JsonSchema\Tests', __DIR__); +$loader->register();