/** * Testing Script run with bindings * * @return void */ public function testRunScriptWithVarsInSession() { $db = new Connection(); $message = $db->open('localhost:8182', 'graph', $this->username, $this->password); $this->assertNotEquals($message, FALSE); $db->message->gremlin = 'cal = 5+5'; $db->message->processor = 'session'; $db->message->setArguments(['session' => $db->getSession()]); $result = $db->send(NULL); $this->assertNotEquals($result, FALSE, 'Running a script with bindings produced an error'); $db->message->gremlin = 'cal = 5+5'; $result = $db->send(NULL, 'session', 'eval'); $this->assertEquals($result, [10], 'Running a script with bindings produced an error'); //check disconnection $message = $db->close(); $this->assertNotEquals($message, FALSE, 'Disconnecting from a session where bindings were used created an error'); }