Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 2734f40

Browse files
committed
BUG: refs #236. Fix broken web api upload test
1 parent de0deb3 commit 2734f40

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/api/tests/controllers/ApiCallMethodsTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,10 @@ public function testUpload()
288288
fclose($fh);
289289
$md5 = md5($string);
290290
$assetstoreFile = BASE_PATH.'/data/assetstore/'.substr($md5, 0, 2).'/'.substr($md5, 2, 2).'/'.$md5;
291-
unlink($assetstoreFile);
291+
if(file_exists($assetstoreFile))
292+
{
293+
unlink($assetstoreFile);
294+
}
292295

293296
$this->params['token'] = $this->_loginUsingApiKey();
294297
$this->params['method'] = 'midas.upload.generatetoken';

0 commit comments

Comments
 (0)