Exemplo n.º 1
0
 /**
  * Test related methods
  */
 public function testGettersSetters()
 {
     $this->assertEquals(count($this->item->getFields()), 0);
     $this->assertEquals($this->item->getId(), 0);
     $field = new FieldMapping();
     $field->setSource('my-code-src');
     $field->setDestination('my-code-dest');
     $field->setIdentifier(true);
     $this->item->addField($field);
     $this->assertEquals(count($this->item->getFields()), 1);
     $this->item->removeField($field);
     $this->assertEquals(count($this->item->getFields()), 0);
 }
 /**
  * {@inheritDoc}
  */
 public function remove(\Akeneo\Bundle\BatchBundle\Transform\Mapping\FieldMapping $field)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'remove', array($field));
     return parent::remove($field);
 }