public function testUploadThemeZipWithoutInfoFile()
{
// Generate zip with no info.xml
$this->fileName = tempnam(sys_get_temp_dir(), 'Theme');
$filePath = $this->fileName . '.zip';
$archive = new ZipArchive();
$archive->open($filePath, ZipArchive::CREATE);
$archive->addEmptyDir($this->fileName);
$archive->close();
if (file_exists($archive->filename)) {
throw new FileNotFoundException('Could not create zip file with theme');
}
$this->submitThemeUploadForm();
// We should get a 200 and show an error.
self::assertEquals(200, $this->client->getResponse()->getStatusCode());
self::assertContains('We could not find an info.xml', $this->client->getResponse()->getContent());
}