Page MenuHomePhabricator

D17773.id42750.diff
No OneTemporary

D17773.id42750.diff

diff --git a/src/applications/files/transform/__tests__/PhabricatorFileTransformTestCase.php b/src/applications/files/transform/__tests__/PhabricatorFileTransformTestCase.php
--- a/src/applications/files/transform/__tests__/PhabricatorFileTransformTestCase.php
+++ b/src/applications/files/transform/__tests__/PhabricatorFileTransformTestCase.php
@@ -2,9 +2,33 @@
final class PhabricatorFileTransformTestCase extends PhabricatorTestCase {
+ protected function getPhabricatorTestCaseConfiguration() {
+ return array(
+ self::PHABRICATOR_TESTCONFIG_BUILD_STORAGE_FIXTURES => 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);
+ }
+ }
+
}

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 8, 11:14 PM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7384926
Default Alt Text
D17773.id42750.diff (1 KB)

Event Timeline