public function testFixedPropertyOps()
 {
     $diff = array('property' => array('key' => '_MDAT', 'p_id' => 29), 'insert' => array(0 => array('s_id' => 462, 'o_serialized' => '1/2016/6/10/2/3/31/0', 'o_sortkey' => '2457549.5857755')), 'delete' => array(0 => array('s_id' => 462, 'o_serialized' => '1/2016/6/10/2/1/0/0', 'o_sortkey' => '2457549.5840278')));
     $instance = new TableChangeOp('foo', $diff);
     $this->assertSame('foo', $instance->getTableName());
     $this->assertTrue($instance->isFixedPropertyOp());
     $this->assertTrue($instance->hasChangeOp(TableChangeOp::OP_INSERT));
     $this->assertSame('_MDAT', $instance->getFixedPropertyValueBy('key'));
     $this->assertInternalType('array', $instance->getFieldChangeOps('insert'));
 }
 private function doUpdateFromTableChangeOp(TableChangeOp $tableChangeOp)
 {
     $deletes = array();
     $inserts = array();
     foreach ($tableChangeOp->getFieldChangeOps('insert') as $insertFieldChangeOp) {
         // Copy fields temporarily
         if ($tableChangeOp->isFixedPropertyOp()) {
             $insertFieldChangeOp->set('p_id', $tableChangeOp->getFixedPropertyValueBy('p_id'));
         }
         $this->doAggregateFromFieldChangeOp(TableChangeOp::OP_INSERT, $insertFieldChangeOp, $inserts);
     }
     foreach ($tableChangeOp->getFieldChangeOps('delete') as $deleteFieldChangeOp) {
         // Copy fields temporarily
         if ($tableChangeOp->isFixedPropertyOp()) {
             $deleteFieldChangeOp->set('p_id', $tableChangeOp->getFixedPropertyValueBy('p_id'));
         }
         $this->doAggregateFromFieldChangeOp(TableChangeOp::OP_DELETE, $deleteFieldChangeOp, $deletes);
     }
     $this->doUpdateOnAggregatedValues($inserts, $deletes);
 }