/** * @test */ public function it_returns_the_correct_property_values() { $expectedId = 'someid'; $collection = new LabelCollection([new Label('keyword 1', true), new Label('keyword 2', true)]); $applyLabels = new MergeLabels(new String('someid'), $collection); $this->assertEquals($expectedId, $applyLabels->getEventId()); $this->assertEquals($collection, $applyLabels->getLabels()); }
/** * @param MergeLabels $applyLabels */ public function handleMergeLabels(MergeLabels $applyLabels) { /** @var Event $event */ $event = $this->eventRepository->load($applyLabels->getEventId()->toNative()); $event->mergeLabels($applyLabels->getLabels()); $this->eventRepository->save($event); }