Exemple #1
0
 /**
  * @covers ByJG\AnyDataset\Repository\SingleRow::rejectChanges
  * @todo   Implement testRejectChanges().
  */
 public function testRejectChanges()
 {
     $this->fill();
     $this->object->setField('field2', 150);
     $this->assertEquals(array('field1' => array(10, 20, 30), 'field2' => 150), $this->object->toArray());
     $this->assertEquals(150, $this->object->getField('field2'));
     $this->object->rejectChanges();
     $this->assertEquals(array('field1' => array(10, 20, 30), 'field2' => 40), $this->object->toArray());
     $this->assertEquals(40, $this->object->getField('field2'));
 }
Exemple #2
0
 /**
  * Override Specific implementation of setPropValue to SingleRow
  *
  * @param SingleRow $obj
  * @param string $propName
  * @param string $value
  */
 protected function setPropValue($obj, $propName, $value)
 {
     $obj->setField($propName, $value);
 }