/** * @test */ public function updateZeroRowsUpdated() { $this->_writeStream->setResponse("0\t1\t0"); $result = $this->_driver->update(1, array('=' => 'value'), array('22', '33'), array(1, 10)); $this->assertEquals("1\t=\t1\tvalue\t1\t10\tU\t22\t33", $this->_writeStream->getLastRequest()); $this->assertInternalType('int', $result); $this->assertEquals(0, $result); }
/** * @param $query * @param $update * @param array $limit * @param array $options * @return array */ public function update($query, $update, $limit = array(1, 0), $options = array()) { return $this->_driverInstance->update($this->getWriteIndex(), $query, $update, $limit, $options); }