Codem\Thumbor\ThumborTest
Module tests
Synopsis
class ThumborTest
extends SapphireTest
{
- // constants
- const WIDTH = 474;
- const HEIGHT = 320;
- const SAMPLE_IMAGE = 'unsplash_5bxCaAcu1dc.jpg';
- // members
- protected boolean $usesDatabase = true;
- protected static string $fixture_file = 'ThumborImageTest.yml';
- private $image;
- private $asset_store;
- // methods
- public void setUp()
- public void tearDown()
- private void unlinkSampleImage()
- private void getSampleImage()
- private void getRemoteImageDimensions()
- public void testHasGenerationKey()
- public void testUrlGeneration()
- public void testAlignSettings()
- public void testSmartCrop()
- public void testPadding()
- public void testWebP()
- public void testCompoundFilters()
- public void testSocialShortcut()
- public void testManualCornerCrop()
- public void testManualCropField()
- public void testManualCrop()
Hierarchy
Extends
- SilverStripe\Dev\SapphireTest
Tasks
Line | Task |
---|---|
273+ | CroppedFocus crop test |
273+ | failing test - HTTP 599: Port number out of range, culprit seems to be /20x20:-40x-40/ being the crop filter |
Constants
Name | Value |
---|---|
WIDTH | 474 |
HEIGHT | 320 |
SAMPLE_IMAGE | 'unsplash_5bxCaAcu1dc.jpg' |
Members
private
- $asset_store
- $image
protected
- $fixture_file
- $usesDatabase
Methods
private
public
- setUp()
- tearDown()
- testAlignSettings() — Test alignment settings
- testCompoundFilters()
- testHasGenerationKey()
- testManualCornerCrop() — Test manual crop from corners
- testManualCrop() — Store some manual crop data against the image, emulating {@link ManualCropField} and then ManualCrop() it
- testManualCropField() — Test that the field returns the expected field
- testPadding() — Test that padding method returns expected command
- testSmartCrop() — Test that smart cropping is on
- testSocialShortcut() — Test that a social shortcut works
- testUrlGeneration() — Create an image and test that the URL matches the Phumbor URL generated
- testWebP() — Test that an image returns as webp (requires server support)