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()); }
/** * Execute preprocessors instances suitable to convert source content type into a destination one * * @param Chain $chain * @return void */ public function process(Chain $chain) { $type = $chain->getTargetContentType(); foreach ($this->getPreProcessors($type) as $preProcessor) { $preProcessor->process($chain); } }
/** * Transform content and/or content type for the specified preprocessing chain object * * @param Chain $chain * @return void */ public function process(Chain $chain) { $chain->setContentType($chain->getTargetContentType()); }