repository = $this->diContainer->get(FormsRepository::class); } public function testItCanTrashForm() { $form = $this->createForm('Form 1'); expect($form->getDeletedAt())->null(); $this->repository->trash($form); expect($form->getDeletedAt())->notNull(); } public function _after() { $this->truncateEntity(FormEntity::class); } private function createForm(string $name): FormEntity { $form = new FormEntity($name); $this->repository->persist($form); $this->repository->flush(); return $form; } }