Skip to content

Reintroduce Tests remote-doc-0009 + 0010 + 0011 #4

Description

@k00ni

Situation

During lanthaler#113 I kept getting the following warnings:

PHP Warning: file_get_contents(http://localhost:8080/test-suite/tests/remote-doc-0009-context.jsonld): Failed to open stream: Connection refused in /var/www/html/Test/TestManifestIterator.php on line 127

and the related tests (remote-doc-0009 + 0010 + 0011) kept failing:

  1. ML\JsonLD\Test\W3CTestSuiteTest::testRemoteDocumentLoading
    The data provider specified for ML\JsonLD\Test\W3CTestSuiteTest::testRemoteDocumentLoading is invalid
    Could not context from URL: http://localhost:8080/test-suite/tests/remote-doc-0009-context.jsonld

/var/www/html/Test/W3CTestSuiteTest.php:196

Temporary solution

I removed the test entries from Test/json-ld-test-suite/remote-doc-manifest.jsonld because I couldn't find a solution.

How to restore the test

In the following are all relevant files and code-parts which were removed and have to be restored and aligned to introduce the test.

Re-add test

Re-add the following entries to Test/json-ld-test-suite/remote-doc-manifest.jsonld.

    {
      "@id": "#t0009",
      "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
      "name": "load JSON-LD document with link",
      "purpose": "If a context is specified in a link header, it is not used for JSON-LD.",
      "option": {
        "httpLink": "<remote-doc-0009-context.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\""
      },
      "input": "remote-doc-0009-in.jsonld",
      "expect": "remote-doc-0009-out.jsonld"
    }, {
      "@id": "#t0010",
      "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
      "name": "load JSON document with link",
      "purpose": "If a context is specified in a link header, it is used for JSON.",
      "option": {
        "httpLink": "<remote-doc-0010-context.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\""
      },
      "input": "remote-doc-0010-in.json",
      "expect": "remote-doc-0010-out.jsonld"
    }, {
      "@id": "#t0011",
      "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
      "name": "load JSON document with extension-type with link",
      "purpose": "If a context is specified in a link header, it is used for a JSON extension type.",
      "input": "remote-doc-0011-in.jldt",
      "option": {
        "contentType": "application/jldTest+json",
        "httpLink": "<remote-doc-0011-context.jsonld>; rel=\"http://www.w3.org/ns/json-ld#context\""
      },
      "expect": "remote-doc-0011-out.jsonld"
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions