Exemplo n.º 1
0
 public function testCreateRelationURLEncoded()
 {
     print "\n" . "Test: create relation X has narrower Y via url-encoded parameter string  ";
     $this->AssertEquals(201, self::$responseX->getStatus(), "\n Cannot perform the test because something is wrong with creating a test concept X: " . self::$responseX->getHeader('X-Error-Msg'));
     $this->AssertEquals(201, self::$responseY->getStatus(), "\n Cannot perform the test because something is wrong with creating a test concept Y: " . self::$responseY->getHeader('X-Error-Msg'));
     $parameterString = 'content' . urlencode("=" . self::$aboutX) . "&type" . urlencode("=http://www.w3.org/2004/02/skos/core#narrower") . 'related' . urlencode("=" . self::$aboutY) . "&tenant" . urlencode("=" . COLLECTION_1_tenant) . '&key' . urlencode("=" . API_KEY);
     $response = RequestResponse::CreateRelationURLEncodedRequest(self::$client, $parameterString);
     $this->AssertEquals(200, $response->getStatus(), $response->getHeader('X-Error-Msg'));
     // todo: add assertions
 }