[^"]+)" "(?[^"]+)" (:?which )?redirects to (?:(an|a|the) )"(?[^"]+)" "(?[^"]+)"$/ */ public function stepCreateRedirectorPage($type, $id, $targetType, $targetId) { $class = 'RedirectorPage'; $targetClass = $this->convertTypeToClass($targetType); $targetObj = $this->fixtureFactory->get($targetClass, $targetId); if(!$targetObj) $targetObj = $this->fixtureFactory->get($targetClass, $targetId); $fields = array('LinkToID' => $targetObj->ID); $obj = $this->fixtureFactory->get($class, $id); if($obj) { $obj->update($fields); } else { $obj = $this->fixtureFactory->createObject($class, $id, $fields); } $obj->write(); $obj->publish('Stage', 'Live'); } }