Model factory for a polymorphic relationship

I'm a bit stuck trying something out. Using a Java style inheritance in laravel to get a collection of specialized segments. I'm having a hard time figuring out how to get the model factory working for phpunit, though the code itself works.

The purpose of this is to delegate the calculation of each versioned segment to it's unique object, while allowing a collection of Segments to reside in a project and quote. There is no specific guarantee that any project will have any specific segment. Yet this creates a completely flexible approach.

In code this is not an issue, as I can enforce the relationship in in the boot creating method of the object, or in the controller. I'm a bit new to TDD and factories, is there a "right way" to do this in the model factory?