/** * @depends testUpdate */ function testDelete() { $c = new \HandlerSocket\WriteSocket(); $c->connect('localhost', 9999); $id = $c->getIndexId($this->db, 'write1', '', 'k,v'); $c->delete($id, '=', array(100500)); $response = $c->readResponse(); if ($response instanceof \HandlerSocket\ErrorMessage) { throw $response; } $this->assertEquals(array(array(1)), $response); //return 1 if OK $c->select($id, '=', array(100500)); $response = $c->readResponse(); if ($response instanceof \HandlerSocket\ErrorMessage) { throw $response; } $this->assertEquals(0, count($response)); // no data with 100500 key }