Skip to content

Commit f8b8a0c

Browse files
authored
Merge pull request #60 from nathansalter/fix-schema-context
Correct ending slash for schema.org
2 parents 32e2ff2 + cdcf360 commit f8b8a0c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/Helpers/JsonLd.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static function prepareDataForSerialization($obj, $parent = null, $schema
7575
)
7676
) {
7777
$data["@context"] = array_merge(
78-
$schema ? ['https://schema.org'] : [],
78+
$schema ? ['https://schema.org/'] : [],
7979
static::$defaultContext
8080
);
8181
}

tests/Unit/ExampleEventTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function testSchemaContext()
106106

107107
$decoded = json_decode($encode, true);
108108

109-
$this->assertContains("https://schema.org", $decoded["@context"]);
109+
$this->assertContains("https://schema.org/", $decoded["@context"]);
110110
}
111111

112112
/**

0 commit comments

Comments
 (0)