server/src/tests/Controllers/ThemeControllerTest.php
changeset 160 c77f06ff3e54
parent 158 366509ae2f37
child 306 3fccf43160a7
--- a/server/src/tests/Controllers/ThemeControllerTest.php	Sat May 07 15:15:01 2016 +0200
+++ b/server/src/tests/Controllers/ThemeControllerTest.php	Sun May 08 14:21:22 2016 +0200
@@ -29,7 +29,7 @@
 
     public function testIndexQuery() {
 
-                $query = preg_replace('/\s+/', ' ', "select (?o as ?theme) (COUNT(?s) as ?count) where {
+        $query = preg_replace('/\s+/', ' ', "select (?o as ?theme) (COUNT(?s) as ?count) where {
                     ?s a <http://www.europeana.eu/schemas/edm/ProvidedCHO> .
                     ?s <http://purl.org/dc/elements/1.1/subject> ?o .
                     FILTER (isIRI(?o) && regex(str(?o), '^".config('corpusparole.bnf_ark_base_url')."')) .
@@ -47,7 +47,7 @@
 
     public function testIndexQueryBnf() {
 
-                $query = preg_replace('/\s+/', ' ', "select (?o as ?theme) (COUNT(?s) as ?count) where {
+        $query = preg_replace('/\s+/', ' ', "select (?o as ?theme) (COUNT(?s) as ?count) where {
                     ?s a <http://www.europeana.eu/schemas/edm/ProvidedCHO> .
                     ?s <http://purl.org/dc/elements/1.1/subject> ?o .
                     FILTER (isIRI(?o) && regex(str(?o), '^".config('corpusparole.bnf_ark_base_url')."')) .
@@ -66,7 +66,7 @@
 
     public function testIndexQueryAll() {
 
-                $query = preg_replace('/\s+/', ' ', "select (?o as ?theme) (COUNT(?s) as ?count) where {
+        $query = preg_replace('/\s+/', ' ', "select (?o as ?theme) (COUNT(?s) as ?count) where {
                     ?s a <http://www.europeana.eu/schemas/edm/ProvidedCHO> .
                     ?s <http://purl.org/dc/elements/1.1/subject> ?o .
                 }
@@ -82,9 +82,9 @@
     }
 
 
-        public function testIndexQueryNone() {
+    public function testIndexQueryNone() {
 
-                $query = preg_replace('/\s+/', ' ', "select (?o as ?theme) (COUNT(?s) as ?count) where {
+        $query = preg_replace('/\s+/', ' ', "select (?o as ?theme) (COUNT(?s) as ?count) where {
                     ?s a <http://www.europeana.eu/schemas/edm/ProvidedCHO> .
                     ?s <http://purl.org/dc/elements/1.1/subject> ?o .
                 }
@@ -148,9 +148,9 @@
             ]));
         $this->get('/api/v1/themes/')->assertTrue($this->response->isOk(), $this->response->content());
         $this->seeJsonEquals(["themes" => [
-            "http://lexvo.org/id/iso639-3/gsw" => ["url" => "http://lexvo.org/id/iso639-3/gsw", "label" => null, "count" => 44],
-            "http://ark.bnf.fr/ark:/12148/cb119339867" => ["url" => "http://ark.bnf.fr/ark:/12148/cb119339867", "label" => null, "count" => 33],
-            "Français" => ["url" => null, "label" => "Français", "count" => 22],
+            "http://lexvo.org/id/iso639-3/gsw" => ["label" => "alémanique", "count" => 44],
+            "http://ark.bnf.fr/ark:/12148/cb119339867" => ["label" => "famille", "count" => 33],
+            "Français" => ["label" => "Français", "count" => 22],
         ]]);
     }
 }