protected function setUp() { $this->marketingList = $this->getMockBuilder('OroCRM\\Bundle\\MarketingListBundle\\Entity\\MarketingList')->disableOriginalConstructor()->getMock(); $this->segment = $this->getMockBuilder('Oro\\Bundle\\SegmentBundle\\Entity\\Segment')->disableOriginalConstructor()->getMock(); $this->marketingList->expects($this->any())->method('getSegment')->will($this->returnValue($this->segment)); $this->factory = new ColumnDefinitionListFactory(); }