Tests: Add phpunit tests

pull/3965/head
Julio 4 years ago
parent 1fed75573b
commit fdef891d08
  1. 7
      tests/CoreBundle/Repository/AssetRepositoryTest.php

@ -87,16 +87,17 @@ class AssetRepositoryTest extends AbstractApiTest
$em->flush();
$url = $assetRepo->getAssetUrl($asset);
$this->assertNotEmpty($url);
$client = static::createClient();
$response = $client->request('GET', $url);
$this->assertSame(Response::HTTP_OK, $response->getStatusCode());
$this->assertResponseIsSuccessful();
$asset = $assetRepo->find($asset->getId());
$assetRepo->delete($asset);
/*$client->request('GET', $url);
$this->assertSame(Response::HTTP_INTERNAL_SERVER_ERROR, $response->getStatusCode());*/
$response = $client->request('GET', $url);
$this->assertSame(Response::HTTP_INTERNAL_SERVER_ERROR, $response->getStatusCode());
}
}

Loading…
Cancel
Save