public function test_updateById_string() { /** === Test Data === */ $ID = 'simple'; $DATA = [[1], [2]]; $UPDATED = 'rows updated'; /** === Setup Mocks === */ // $val = is_int($id) ? $id : $this->_conn->quote($id); $this->mConn->shouldReceive('quote')->once()->andReturn("'{$ID}'"); // $result = $this->_repoGeneric->updateEntity($this->_entityName, $data, $where); $this->mRepoGeneric->shouldReceive('updateEntity')->once()->with($this->ENTITY_NAME, $DATA, $this->PK_ATTR . "='{$ID}'")->andReturn($UPDATED); /** === Call and asserts === */ $res = $this->obj->updateById($ID, $DATA); $this->assertEquals($UPDATED, $res); }
public function updateById($id, $data) { return parent::updateById($id, $data); // TODO: Change the autogenerated stub }