示例#1
0
 /**
  * Testing getSerializer
  * 
  * @return void
  */
 public function testgetSerializer()
 {
     $db = new Connection();
     $this->assertEquals($db->getSerializer(), 'MSGPACK', 'Failed to return correct serializer value');
     $db->setSerializer(Messages::SERIALIZER_JSON);
     $this->assertEquals($db->getSerializer(), 'JSON', 'Failed to return correct serializer value');
 }
示例#2
0
 /**
  * Testing failing message connection close()
  * 
  * @return void
  */
 public function testConnectCloseFailingMessage()
 {
     $db = new Connection();
     $db->setSerializer(Messages::SERIALIZER_JSON);
     $db->open('localhost', 'tinkergraph', $this->username, $this->password);
     $db->sessionUuid = '';
     $result = $db->close();
     $this->assertFalse($result, 'Failed to return false with no transaction started');
 }