Пример #1
0
 /**
  * @test
  */
 public function shouldBeAbleToUpdateExistingRow()
 {
     // given
     $table = $this->getExistingRecord();
     $id = $table->getId();
     $table->setFirstname('Harry');
     $table->setLastname('Johnson');
     $table->commit();
     // then
     $this->assertEquals('Harry', $table->getFirstname());
     // when
     $newInstance = new TestTable($table->getId());
     // then
     $this->assertEquals($id, $table->getId());
     $this->assertEquals('Harry', $newInstance->getFirstname());
     $this->assertEquals('Johnson', $newInstance->getLastname());
 }