diff --git a/src/applications/files/transform/__tests__/PhabricatorFileTransformTestCase.php b/src/applications/files/transform/__tests__/PhabricatorFileTransformTestCase.php index 4cc4a6e54b..d9a9012ef0 100644 --- a/src/applications/files/transform/__tests__/PhabricatorFileTransformTestCase.php +++ b/src/applications/files/transform/__tests__/PhabricatorFileTransformTestCase.php @@ -1,10 +1,34 @@ true, + ); + } + public function testGetAllTransforms() { PhabricatorFileTransform::getAllTransforms(); $this->assertTrue(true); } + public function testThumbTransformDefaults() { + $xforms = PhabricatorFileTransform::getAllTransforms(); + $file = new PhabricatorFile(); + + foreach ($xforms as $xform) { + if (!($xform instanceof PhabricatorFileThumbnailTransform)) { + continue; + } + + // For thumbnails, generate the default thumbnail. This should be able + // to generate something rather than throwing an exception because we + // forgot to add a default file to the builtin resources. See T12614. + $xform->getDefaultTransform($file); + + $this->assertTrue(true); + } + } + }