Example #1
0
 public function testGettersAndSetters()
 {
     $this->assertEquals('origType', $this->object->getOrigContentType());
     $this->assertEquals('origType', $this->object->getContentType());
     $this->assertEquals('origContent', $this->object->getOrigContent());
     $this->assertEquals('origContent', $this->object->getContent());
     $this->assertEquals('assetType', $this->object->getTargetContentType());
     $this->object->setContent('anotherContent');
     $this->object->setContentType('anotherType');
     $this->assertEquals('origType', $this->object->getOrigContentType());
     $this->assertEquals('anotherType', $this->object->getContentType());
     $this->assertEquals('origContent', $this->object->getOrigContent());
     $this->assertEquals('anotherContent', $this->object->getContent());
     $this->assertEquals('assetType', $this->object->getTargetContentType());
 }
Example #2
0
 /**
  * Execute preprocessors instances suitable to convert source content type into a destination one
  *
  * @param Chain $chain
  * @return void
  */
 public function process(Chain $chain)
 {
     $fromType = $chain->getOrigContentType();
     $toType = $chain->getTargetContentType();
     foreach ($this->getPreProcessors($fromType, $toType) as $preProcessor) {
         $preProcessor->process($chain);
     }
 }