setBaseUrl('https://mangadex.org') ->setChapterUrlFormat('https://mangadex.org/chapter/{id}') ->setScrapingType('html'); $this->entityManager->persist($source); $this->entityManager->flush(); $this->sourceId = $source->getId(); } public function testItDeletesSourceSuccessfully(): void { static::createClient()->request('DELETE', "/api/content-sources/{$this->sourceId}"); $this->assertResponseStatusCodeSame(Response::HTTP_NO_CONTENT); $this->entityManager->clear(); $deletedSource = $this->entityManager->find(ContentSource::class, $this->sourceId); $this->assertNull($deletedSource); } public function testItReturnsNotFoundWhenSourceDoesNotExist(): void { static::createClient()->request('DELETE', '/api/content-sources/999999'); $this->assertResponseStatusCodeSame(Response::HTTP_NOT_FOUND); } }