Skip to content

Commit 4b9018f

Browse files
author
bruno_p_reis
committed
little refactoring to work easier on other servers
git-svn-id: https://jsonschemaphpv.svn.sourceforge.net/svnroot/jsonschemaphpv/trunk@2 14558f9d-7ea9-46ec-92da-52a2cad6a683
1 parent fdf1e75 commit 4b9018f

23 files changed

+482
-22
lines changed

JsonSchema.php

Lines changed: 455 additions & 0 deletions
Large diffs are not rendered by default.

JsonSchemaUndefined.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?php
2+
class JsonSchemaUndefined {}
3+
?>

seleniumTests/SUITEPhpJsJsonSchemaValidator

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
44
<head>
55
<meta content="text/html; charset=UTF-8" http-equiv="content-type" />
6+
<link rel="selenium.base" href="http://jsonschemaphpvalidator" />
67
<title>Test Suite</title>
78
</head>
89
<body>

seleniumTests/additionalProperties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/arrays

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/basicTypes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
44
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
55
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6-
<link rel="selenium.base" href="http://essaylibrary/" />
6+
<link rel="selenium.base" href="http://jsonschemaphpv" />
77
<title>basicTypes</title>
88
</head>
99
<body>
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/disallow

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/enum

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/extends

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/maxDecimal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/minItemsMaxItems

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/minLengthMaxLength

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/minimumMaximum

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/numberAndIntegerTypes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/optionalProperty

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/pattern

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/require

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/selfDefinedSchema

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/tupleTyping

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/unionTypes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/unionWithNullValue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

seleniumTests/wrongMessagesFailingTestCase

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</thead><tbody>
1414
<tr>
1515
<td>open</td>
16-
<td>/jsonValidator/validator.html</td>
16+
<td>/validator.html</td>
1717
<td></td>
1818
</tr>
1919
<tr>

validate.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?php
2-
require_once('../../plugins/JsSchema/lib/JsSchema.php');
2+
require_once('JsonSchema.php');
3+
require_once('JsonSchemaUndefined.php');
34
Dbg::$quietMode = true;
45

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

20-
$result = JsSchema::validate(
21+
$result = JsonSchema::validate(
2122
$json,
2223
$schema
2324
);

0 commit comments

Comments
 (0)