public function testRemoveOption() { $tag1 = $this->dummyData->getTag(); $this->tagRepository->shouldReceive('findOneById')->with($tag1->getId())->andReturn($tag1)->once(); $option1 = $this->dummyData->getOption(); $this->optionRepository->shouldReceive('findOneById')->with($option1->getId())->andReturn($option1)->once(); $this->tagRepository->shouldReceive('update')->once(); $this->tagService->removeOption($tag1->getId(), $option1->getId()); }