protected function assertProcessSegment() { $formData = array('definition' => 'test'); $this->form->expects($this->once())->method('getName')->will($this->returnValue('test_form')); $this->request->request->set('test_form', $formData); $businessUnit = $this->getMockBuilder('Oro\\Bundle\\OrganizationBundle\\Entity\\BusinessUnit')->disableOriginalConstructor()->getMock(); $owner = $this->getMockBuilder('Oro\\Bundle\\UserBundle\\Entity\\User')->disableOriginalConstructor()->getMock(); $owner->expects($this->atLeastOnce())->method('getOwner')->will($this->returnValue($businessUnit)); $this->testEntity->setName('test')->setDescription('description')->setType(new MarketingListType(MarketingListType::TYPE_DYNAMIC))->setOwner($owner); $segmentType = new SegmentType(SegmentType::TYPE_DYNAMIC); $this->manager->expects($this->once())->method('find')->with('OroSegmentBundle:SegmentType', MarketingListType::TYPE_DYNAMIC)->will($this->returnValue($segmentType)); }
public function testToString() { $this->entity->setName('test'); $this->assertEquals('test', $this->entity->__toString()); }