protected function setUp()
 {
     $this->columnDefinitionListFactory = $this->getMockBuilder('OroCRM\\Bundle\\MailChimpBundle\\Model\\Segment\\ColumnDefinitionListFactory')->disableOriginalConstructor()->getMock();
     $this->columnDefinitionList = $this->getMock('OroCRM\\Bundle\\MailChimpBundle\\Model\\Segment\\ColumnDefinitionListInterface');
     $this->marketingList = new MarketingList();
     $this->columnDefinitionListFactory->expects($this->any())->method('create')->with($this->marketingList)->will($this->returnValue($this->columnDefinitionList));
     $this->provider = new Provider($this->columnDefinitionListFactory);
 }
 /**
  * {@inheritdoc}
  */
 public function provideExtendedMergeVars(MarketingList $marketingList)
 {
     $vars = $this->columnDefinitionListFactory->create($marketingList)->getColumns();
     foreach ($this->providers as $provider) {
         $currentProviderVars = $provider->provideExtendedMergeVars($marketingList);
         if (!empty($currentProviderVars)) {
             $vars = array_merge($vars, $currentProviderVars);
         }
     }
     return $vars;
 }
 public function testCreate()
 {
     $object = $this->factory->create($this->marketingList);
     $this->assertInstanceOf('OroCRM\\Bundle\\MailChimpBundle\\Model\\Segment\\ColumnDefinitionList', $object);
 }