equal
deleted
inserted
replaced
447 * check query |
447 * check query |
448 * @return void |
448 * @return void |
449 */ |
449 */ |
450 public function testQuery() { |
450 public function testQuery() { |
451 |
451 |
452 $expectedUri = config('corpusparole.lexvo_sesame_query_url')."?query=PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0ASELECT+%3Fs+%3Fo+WHERE+%7B%7B%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Ffra%3E+rdfs%3Alabel+%3Fo.+%3Fs+rdfs%3Alabel+%3Fo+FILTER%28%3Fs+%3D+%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Ffra%3E+%26%26+%28lang%28%3Fo%29+%3D+%22fr%22+%7C%7C+lang%28%3Fo%29+%3D+%22en%22%29%29%7D+UNION+%7B%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Fafr%3E+rdfs%3Alabel+%3Fo.+%3Fs+rdfs%3Alabel+%3Fo+FILTER%28%3Fs+%3D+%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Fafr%3E+%26%26+%28lang%28%3Fo%29+%3D+%22fr%22+%7C%7C+lang%28%3Fo%29+%3D+%22en%22%29%29%7D%7D"; |
452 $expectedUri = config('corpusparole.lexvo_rdf4j_query_url')."?query=PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0ASELECT+%3Fs+%3Fo+WHERE+%7B%7B%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Ffra%3E+rdfs%3Alabel+%3Fo.+%3Fs+rdfs%3Alabel+%3Fo+FILTER%28%3Fs+%3D+%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Ffra%3E+%26%26+%28lang%28%3Fo%29+%3D+%22fr%22+%7C%7C+lang%28%3Fo%29+%3D+%22en%22%29%29%7D+UNION+%7B%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Fafr%3E+rdfs%3Alabel+%3Fo.+%3Fs+rdfs%3Alabel+%3Fo+FILTER%28%3Fs+%3D+%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Fafr%3E+%26%26+%28lang%28%3Fo%29+%3D+%22fr%22+%7C%7C+lang%28%3Fo%29+%3D+%22en%22%29%29%7D%7D"; |
453 $response = m::mock('EasyRdf\Http\Response') |
453 $response = m::mock('EasyRdf\Http\Response') |
454 ->shouldReceive('isSuccessful')->andReturn(true) |
454 ->shouldReceive('isSuccessful')->andReturn(true) |
455 ->shouldReceive('getBody')->andReturn(self::LEXVO_EMPTY_RDF_RESP) //result not important |
455 ->shouldReceive('getBody')->andReturn(self::LEXVO_EMPTY_RDF_RESP) //result not important |
456 ->shouldReceive('getStatus')->andReturn(200) |
456 ->shouldReceive('getStatus')->andReturn(200) |
457 ->shouldReceive('getHeader')->andReturn('application/sparql-results+json;charset=UTF-8') |
457 ->shouldReceive('getHeader')->andReturn('application/sparql-results+json;charset=UTF-8') |
476 * check query |
476 * check query |
477 * @return void |
477 * @return void |
478 */ |
478 */ |
479 public function testQueryFullId() { |
479 public function testQueryFullId() { |
480 |
480 |
481 $expectedUri = config('corpusparole.lexvo_sesame_query_url')."?query=PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0ASELECT+%3Fs+%3Fo+WHERE+%7B%7B%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Ffra%3E+rdfs%3Alabel+%3Fo.+%3Fs+rdfs%3Alabel+%3Fo+FILTER%28%3Fs+%3D+%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Ffra%3E+%26%26+%28lang%28%3Fo%29+%3D+%22fr%22+%7C%7C+lang%28%3Fo%29+%3D+%22en%22%29%29%7D+UNION+%7B%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Fafr%3E+rdfs%3Alabel+%3Fo.+%3Fs+rdfs%3Alabel+%3Fo+FILTER%28%3Fs+%3D+%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Fafr%3E+%26%26+%28lang%28%3Fo%29+%3D+%22fr%22+%7C%7C+lang%28%3Fo%29+%3D+%22en%22%29%29%7D%7D"; |
481 $expectedUri = config('corpusparole.lexvo_rdf4j_query_url')."?query=PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0ASELECT+%3Fs+%3Fo+WHERE+%7B%7B%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Ffra%3E+rdfs%3Alabel+%3Fo.+%3Fs+rdfs%3Alabel+%3Fo+FILTER%28%3Fs+%3D+%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Ffra%3E+%26%26+%28lang%28%3Fo%29+%3D+%22fr%22+%7C%7C+lang%28%3Fo%29+%3D+%22en%22%29%29%7D+UNION+%7B%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Fafr%3E+rdfs%3Alabel+%3Fo.+%3Fs+rdfs%3Alabel+%3Fo+FILTER%28%3Fs+%3D+%3Chttp%3A%2F%2Flexvo.org%2Fid%2Fiso639-3%2Fafr%3E+%26%26+%28lang%28%3Fo%29+%3D+%22fr%22+%7C%7C+lang%28%3Fo%29+%3D+%22en%22%29%29%7D%7D"; |
482 $response = m::mock('EasyRdf\Http\Response') |
482 $response = m::mock('EasyRdf\Http\Response') |
483 ->shouldReceive('isSuccessful')->andReturn(true) |
483 ->shouldReceive('isSuccessful')->andReturn(true) |
484 ->shouldReceive('getBody')->andReturn(self::LEXVO_EMPTY_RDF_RESP) //result not important |
484 ->shouldReceive('getBody')->andReturn(self::LEXVO_EMPTY_RDF_RESP) //result not important |
485 ->shouldReceive('getStatus')->andReturn(200) |
485 ->shouldReceive('getStatus')->andReturn(200) |
486 ->shouldReceive('getHeader')->andReturn('application/sparql-results+json;charset=UTF-8') |
486 ->shouldReceive('getHeader')->andReturn('application/sparql-results+json;charset=UTF-8') |