Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests not passed #6

Closed
fferriere opened this issue Aug 1, 2016 · 1 comment
Closed

Tests not passed #6

fferriere opened this issue Aug 1, 2016 · 1 comment

Comments

@fferriere
Copy link
Contributor

On JSON asserter's test, failure appear :

Failure (2 tests, 10/10 methods, 0 void method, 0 skipped method, 0 uncompleted method, 0 failure, 0 error, 3 exceptions)!                                                                                                                      
> There are 3 exceptions:
=> mageekguy\atoum\jsonSchema\tests\units\asserters\json::testSetWithJsonGrammar():
==> An exception has been thrown in file json-schema-extension/tests/units/classes/asserters/json.php on line 46:
==> exception 'mageekguy\atoum\asserter\exception' with message 'string(43) '{
==> "M*4M" : [
==> " jnd       " ]
                   ,    "
                         a! "   : null } ' is not a valid JSON string' in json-schema-extension/vendor/atoum/atoum/classes/asserter.php:142
==> Stack trace:
==> #0 json-schema-extension/classes/asserters/json.php(42): mageekguy\atoum\asserter->fail('string(43) '{\n"...')
==> #1 json-schema-extension/tests/units/classes/asserters/json.php(46): mageekguy\atoum\jsonSchema\asserters\json->setWith('{\n"M*4M"\xC2\xA0: [\n"...')
==> #2 [internal function]: mageekguy\atoum\jsonSchema\tests\units\asserters\json->testSetWithJsonGrammar('{\n"M*4M"\xC2\xA0: [\n"...')
==> #3 json-schema-extension/vendor/atoum/atoum/classes/test.php(1329): ReflectionMethod->invokeArgs(Object(mageekguy\atoum\jsonSchema\tests\units\asserters\json), Array)
==> #4 -(1): mageekguy\atoum\test->runTestMethod('testSetWithJson...')
==> #5 {main}
=> mageekguy\atoum\jsonSchema\tests\units\asserters\json::testValidatesJsonArrayGrammar():
==> An exception has been thrown in file json-schema-extension/tests/units/classes/asserters/json.php on line 95:
"=> exception 'mageekguy\atoum\asserter\exception' with message 'string(45) '[ {
 f3j " : [      true ,
true ]ue ,
      } ] ' is not a valid JSON string' in json-schema-extension/vendor/atoum/atoum/classes/asserter.php:142
==> Stack trace:
==> #0 json-schema-extension/classes/asserters/json.php(42): mageekguy\atoum\asserter->fail('string(45) '[ {...')
==> #1 json-schema-extension/tests/units/classes/asserters/json.php(95): mageekguy\atoum\jsonSchema\asserters\json->setWith('[ {\r"\ff3j " : [...')
==> #2 [internal function]: mageekguy\atoum\jsonSchema\tests\units\asserters\json->testValidatesJsonArrayGrammar('[ {\r"\ff3j " : [...')
==> #3 json-schema-extension/vendor/atoum/atoum/classes/test.php(1329): ReflectionMethod->invokeArgs(Object(mageekguy\atoum\jsonSchema\tests\units\asserters\json), Array)
==> #4 -(1): mageekguy\atoum\test->runTestMethod('testValidatesJs...')
==> #5 {main}
=> mageekguy\atoum\jsonSchema\tests\units\asserters\json::testNotValidatesJsonArrayGrammar():
==> An exception has been thrown in file json-schema-extension/tests/units/classes/asserters/json.php on line 111:
:LG$ "ception 'mageekguy\atoum\asserter\exception' with message 'string(55) '{ "
 true , "
         A
: true , "  j " : true  }
==> ' is not a valid JSON string' in json-schema-extension/vendor/atoum/atoum/classes/asserter.php:142
==> Stack trace:
==> #0 json-schema-extension/classes/asserters/json.php(42): mageekguy\atoum\asserter->fail('string(55) '{ "...')
==> #1 json-schema-extension/tests/units/classes/asserters/json.php(111): mageekguy\atoum\jsonSchema\asserters\json->setWith('{ "\r|LG$ "\r:\ftr...')
==> #2 [internal function]: mageekguy\atoum\jsonSchema\tests\units\asserters\json->testNotValidatesJsonArrayGrammar('{ "\r|LG$ "\r:\ftr...')
==> #3 json-schema-extension/vendor/atoum/atoum/classes/test.php(1329): ReflectionMethod->invokeArgs(Object(mageekguy\atoum\jsonSchema\tests\units\asserters\json), Array)
==> #4 -(1): mageekguy\atoum\test->runTestMethod('testNotValidate...')
==> #5 {main}

The problem seems to be with extra characters like "\f" or with UTF-8 characters like " U+00A0 | 194 160 | NO-BREAK SPACE".

@agallou
Copy link
Member

agallou commented Nov 13, 2016

fixed in #13

@agallou agallou closed this as completed Nov 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants