WEBPManipulationTest
extends TestCase
in package
This tests Spitfire's ability to handle WEBP files, which are an image format developed by Google to reduce the bandwidth and storage requirements of images while maintaining a good level of detail.
As of April 2020, the format has about 80% adoption across all browsers (source: https://caniuse.com/#search=webp) and has received mainline support from the PHP core. Which makes it easy to deploy into existing environments.
Table of Contents
- $filename : mixed
- $tmpdir : mixed
- setUp() : void
- tearDownAfterClass() : void
- testInputWEBP() : mixed
- Loads the webp file we generated in the previous step and check whether GD handled the file.
- testOutputWEBP() : type
- Loads the PNG file in the folder and writes it to a webp file. If everything went correctly, the output path should exist.
Properties
$filename
private
mixed
$filename
$tmpdir
private
static mixed
$tmpdir
= '/tmp'
Methods
setUp()
public
setUp() : void
Return values
void —tearDownAfterClass()
public
static tearDownAfterClass() : void
Return values
void —testInputWEBP()
Loads the webp file we generated in the previous step and check whether GD handled the file.
public
testInputWEBP(mixed $output) : mixed
Parameters
- $output : mixed
Tags
Return values
mixed —testOutputWEBP()
Loads the PNG file in the folder and writes it to a webp file. If everything went correctly, the output path should exist.
public
testOutputWEBP() : type