@@ -25,7 +25,7 @@ public function setUp(): void
2525 static ::setAppNamespace ('MixerApi\JsonLdView\Test\App ' );
2626 }
2727
28- public function testContexts ()
28+ public function test_context_singular_camelcase ()
2929 {
3030 $ this ->get ('/contexts/Actor ' );
3131
@@ -36,7 +36,40 @@ public function testContexts()
3636 $ this ->assertEquals ('https://schema.org/givenName ' , $ object ->{'@context ' }->first_name );
3737 }
3838
39- public function testVocab ()
39+ public function test_context_plural_camelcase ()
40+ {
41+ $ this ->get ('/contexts/Actors ' );
42+
43+ $ body = (string )$ this ->_response ->getBody ();
44+ $ object = json_decode ($ body );
45+
46+ $ this ->assertResponseOk ();
47+ $ this ->assertEquals ('https://schema.org/givenName ' , $ object ->{'@context ' }->first_name );
48+ }
49+
50+ public function test_context_singular_lowercase ()
51+ {
52+ $ this ->get ('/contexts/actor ' );
53+
54+ $ body = (string )$ this ->_response ->getBody ();
55+ $ object = json_decode ($ body );
56+
57+ $ this ->assertResponseOk ();
58+ $ this ->assertEquals ('https://schema.org/givenName ' , $ object ->{'@context ' }->first_name );
59+ }
60+
61+ public function test_context_plural_lowercase ()
62+ {
63+ $ this ->get ('/contexts/actors ' );
64+
65+ $ body = (string )$ this ->_response ->getBody ();
66+ $ object = json_decode ($ body );
67+
68+ $ this ->assertResponseOk ();
69+ $ this ->assertEquals ('https://schema.org/givenName ' , $ object ->{'@context ' }->first_name );
70+ }
71+
72+ public function test_vocab ()
4073 {
4174 $ this ->get ('/vocab ' );
4275
0 commit comments