From 2bb53047ae9272c0159ca5ab10a2f1768c214698 Mon Sep 17 00:00:00 2001
From: Sebastian De Deyne
Date: Mon, 25 Jun 2018 14:09:30 +0200
Subject: [PATCH] Fix generated types
---
generator/templates/static/BaseType.php | 2 +-
src/BaseType.php | 2 +-
tests/BaseTypeTest.php | 2 +-
tests/GeneratedTypeSmokeTest.php | 4 +-
tests/data/schema-excerpt.rdfa | 94 ++++++++++++-------------
5 files changed, 52 insertions(+), 52 deletions(-)
diff --git a/generator/templates/static/BaseType.php b/generator/templates/static/BaseType.php
index 720b6a580..c79dd4bce 100644
--- a/generator/templates/static/BaseType.php
+++ b/generator/templates/static/BaseType.php
@@ -14,7 +14,7 @@ abstract class BaseType implements Type, \ArrayAccess, \JsonSerializable
public function getContext(): string
{
- return 'http://schema.org';
+ return 'https://schema.org';
}
public function getType(): string
diff --git a/src/BaseType.php b/src/BaseType.php
index 720b6a580..c79dd4bce 100644
--- a/src/BaseType.php
+++ b/src/BaseType.php
@@ -14,7 +14,7 @@ abstract class BaseType implements Type, \ArrayAccess, \JsonSerializable
public function getContext(): string
{
- return 'http://schema.org';
+ return 'https://schema.org';
}
public function getType(): string
diff --git a/tests/BaseTypeTest.php b/tests/BaseTypeTest.php
index bb8a42502..d1407b8d4 100644
--- a/tests/BaseTypeTest.php
+++ b/tests/BaseTypeTest.php
@@ -171,7 +171,7 @@ public function it_can_create_an_ld_json_script_tag()
$type->setProperty('foo', 'bar');
$expected = '';
$this->assertEquals($expected, $type->toScript());
diff --git a/tests/GeneratedTypeSmokeTest.php b/tests/GeneratedTypeSmokeTest.php
index 5b8b63553..6f0898625 100644
--- a/tests/GeneratedTypeSmokeTest.php
+++ b/tests/GeneratedTypeSmokeTest.php
@@ -29,7 +29,7 @@ public function it_can_be_rendered_with_properties()
->email('info@spatie.be');
$expected = '';
$this->assertEquals($expected, $localBusiness->toScript());
@@ -43,7 +43,7 @@ public function it_can_be_rendered_with_child_properties()
->contactPoint(Schema::contactPoint()->areaServed('Worldwide'));
$expected = '';
diff --git a/tests/data/schema-excerpt.rdfa b/tests/data/schema-excerpt.rdfa
index 5a984602f..48f189cb9 100644
--- a/tests/data/schema-excerpt.rdfa
+++ b/tests/data/schema-excerpt.rdfa
@@ -21,122 +21,122 @@
This is an RDFa-based representation of the schema.org schema, the underlying representation of the schema.org vocabulary.
It is represented in a form based on W3C RDF/RDFS. We encourage proposals for schema.org improvements to be expressed
- in this same style. See the how we work document for information on collaboration.
+ in this same style. See the how we work document for information on collaboration.
- See datamodel for more details,
- the developers page for alternate formats.
+ See datamodel for more details,
+ the developers page for alternate formats.
Note: the style of RDFa used here may change in the future. To see the substantive content of the schema, view the
HTML source markup. We use a simple subset of RDFa for syntax, including prefixes that are declared in the
RDFa initial context. We also use Markdown syntax within comments to
- make hypertext documentation easier to edit. Other formats are available.
+ make hypertext documentation easier to edit. Other formats are available.
-
+
Thing
The most generic type of item.
-
+
CreativeWork
The most generic kind of creative work, including books, movies, photographs, software programs, etc.
-
Subclass of: Thing
+
Subclass of: Thing
Source: rNews
-
+
WebPage
A web page. Every web page is implicitly assumed to be declared to be of type WebPage, so the various properties about that webpage, such as <code>breadcrumb</code> may be used. We recommend explicit declaration if these properties are specified, but if they are found outside of an itemscope, they will be assumed to be about the page.
-
Subclass of: CreativeWork
+
Subclass of: CreativeWork
-
+
AboutPage
Web page type: About page.
-
Subclass of: WebPage
+
Subclass of: WebPage
-
+
Organization
An organization such as a school, NGO, corporation, club, etc.
-
Subclass of: Thing
+
Subclass of: Thing
-
+
-
+
-
+
Intangible
A utility class that serves as the umbrella for a number of 'intangible' things such as quantities, structured values, etc.
-
Subclass of: Thing
+
Subclass of: Thing
-
+
StructuredValue
Structured values are used when the value of a property has a more complex structure than simply being a textual value or a reference to another thing.
-
Subclass of: Intangible
+
Subclass of: Intangible
-
+
-
+
-
+
schemaVersion
-
Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application.
-
Domain: CreativeWork
-
Range: URL
-
Range: Text
+
Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as https://schema.org/version/2.0/ if precise indication of schema version was required by some application.
+
Domain: CreativeWork
+
Range: URL
+
Range: Text
-