public function testSetDefinition() { $definition = 'test'; $segment = $this->getMock('Oro\\Bundle\\SegmentBundle\\Entity\\Segment'); $segment->expects($this->once())->method('setDefinition')->with($definition); $this->entity->setSegment($segment); $this->entity->setDefinition($definition); }