public function testTransactionRollback() { $cypher = new Cypher('http://localhost:7474'); $cypher->beginTransaction(); $create = $cypher->statement('CREATE (n) RETURN id(n) AS id')->execute(); $cypher->rollback(); try { $fetch = $cypher->statement('START n = node({id}) RETURN id(n) AS id', array('id' => $create[0][0]['id']))->execute(); } catch (EntityNotFound $error) { // var_dump($error->code); var_dump($error->getMessage()); } }
public function testStatement() { $cypher = new Cypher(); $statement = $cypher->statement('test'); $this->assertInstanceOf('EndyJasmi\\Cypher\\Request', $statement); }