protected function setUp() { global $EndPoint4store, $modeDebug, $prefixSparql, $prefixTurtle, $graph1, $graph2; $s = new Endpoint($EndPoint4store, false, $modeDebug); $r = $s->delete($graph1); $r = $s->delete($graph2); $r = $s->delete("default:"); }
static function deleteGraph($graph, $endpoint) { //FIXME Not sparql for 4store $s = new Endpoint($endpoint); $r = $s->delete($graph); if (!$r) { $msg = "Query delete Graph"; throw new Exception($msg); } }
/** * Test if Endpoints can be created for all databases */ public function testDeleteNonExistentEndpoint() { $endpoint = 'tcp://127.0.0.1:8532'; // Try to get a non-existent document out of a nonexistent collection // This should cause an exception with a code of 404 try { $e = null; $response = Endpoint::delete($this->connection, $endpoint); } catch (\Exception $e) { // don't bother us... just give us the $e } $this->assertInstanceOf('triagens\\ArangoDb\\ServerException', $e); $this->assertTrue($e->getCode() == 404, 'Should be 404, instead got: ' . $e->getCode()); }
<?php /** * @version 0.4.1 * @package Bourdercloud/PHP4store * @copyright (c) 2011 Bourdercloud.com * @author Karima Rafes <*****@*****.**> * @license http://www.opensource.org/licenses/mit-license.php */ /** * @ignore */ require 'init4Store.php'; //require_once('php4store/Endpoint.php'); require '../lib/php4store/Endpoint.php'; //remove this line in your code start4store(); $readonly = false; $s = new Endpoint('http://*****:*****@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n\t<http://github.com/bordercloud/4store-php> foaf:maker <http://www.bordercloud.com/wiki/user:Karima_Rafes> .\n"); //AND delete the graph $r = $s->delete('http://example/test'); var_dump($r); //remove this line in your code stop4store();