Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15333032
D17773.id42750.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D17773.id42750.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D17773: Add unit tests for file thumbnail generation
Attached
Detach File
Event Timeline
Log In to Comment