Skip to content

Commit

Permalink
little refactoring to work easier on other servers
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Reis committed Dec 11, 2008
1 parent b207c99 commit c0700b5
Show file tree
Hide file tree
Showing 23 changed files with 482 additions and 22 deletions.
455 changes: 455 additions & 0 deletions JsonSchema.php

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions JsonSchemaUndefined.php
@@ -0,0 +1,3 @@
<?php
class JsonSchemaUndefined {}
?>
1 change: 1 addition & 0 deletions seleniumTests/SUITEPhpJsJsonSchemaValidator
Expand Up @@ -3,6 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
<link rel="selenium.base" href="http://jsonschemaphpvalidator" />
<title>Test Suite</title>
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/additionalProperties
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/arrays
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions seleniumTests/basicTypes
Expand Up @@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://essaylibrary/" />
<link rel="selenium.base" href="http://jsonschemaphpv" />
<title>basicTypes</title>
</head>
<body>
Expand All @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/disallow
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/enum
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/extends
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/maxDecimal
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/minItemsMaxItems
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/minLengthMaxLength
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/minimumMaximum
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/numberAndIntegerTypes
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/optionalProperty
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/pattern
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/require
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/selfDefinedSchema
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/tupleTyping
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/unionTypes
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/unionWithNullValue
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion seleniumTests/wrongMessagesFailingTestCase
Expand Up @@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
<td>/jsonValidator/validator.html</td>
<td>/validator.html</td>
<td></td>
</tr>
<tr>
Expand Down
5 changes: 3 additions & 2 deletions validate.php
@@ -1,5 +1,6 @@
<?php
require_once('../../plugins/JsSchema/lib/JsSchema.php');
require_once('JsonSchema.php');
require_once('JsonSchemaUndefined.php');
Dbg::$quietMode = true;

if($_REQUEST['schema']) {
Expand All @@ -17,7 +18,7 @@
trigger_error('Could not parse the JSON object.',E_USER_ERROR);
}

$result = JsSchema::validate(
$result = JsonSchema::validate(
$json,
$schema
);
Expand Down

0 comments on commit c0700b5

Please sign in to comment.