/**
  * Ignores all remaining unmapped members that do not exist on the destination.
  *
  * @return $this
  */
 public function ignoreAllNonExisting()
 {
     foreach ($this->typeMap->getUnmappedPropertyMaps() as $propertyMap) {
         $propertyMap->ignore();
     }
     return $this;
 }
Exemple #2
0
 public function testGetUnmappedProperty()
 {
     // arrange
     $mappedPropertyMap = self::createMappedProperty();
     $unmappedPropertyMap = self::createUnmappedProperty();
     $typeMap = new TypeMap('SomeType', 'AnotherType', \Mockery::mock('Papper\\ObjectCreatorInterface'));
     $typeMap->addPropertyMap($mappedPropertyMap);
     $typeMap->addPropertyMap($unmappedPropertyMap);
     // act
     $unmappedProperties = $typeMap->getUnmappedPropertyMaps();
     // assert
     $this->assertCount(1, $unmappedProperties);
     $this->assertSame($unmappedPropertyMap, $unmappedProperties['unmapped']);
 }