public function it_can_delete_a_collection(ConfigCollection $collection) { $uuid = Uuid::uuid4(); $collection->getUuid()->willReturn($uuid); $this->objectRepository->delete(ConfigCollection::TYPE, $uuid)->shouldBeCalled(); $this->delete($collection); }
public function delete(ConfigCollection $collection) { // The database constraint should cascade the delete to the collection and its items $this->objectRepository->delete(ConfigCollection::TYPE, $collection->getUuid()); }