mirror of
https://github.com/devilbox/docker-php-fpm.git
synced 2025-12-11 19:41:16 +00:00
Add more gd tests
This commit is contained in:
20
tests/mods/modules/gd/gd-freetype.php
Normal file
20
tests/mods/modules/gd/gd-freetype.php
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This page should print 'OK' if everything works,
|
||||||
|
* 'FAIL' or nothing if an error occured.
|
||||||
|
*/
|
||||||
|
ini_set('display_startup_errors', 1);
|
||||||
|
ini_set('display_errors', 1);
|
||||||
|
error_reporting(-1);
|
||||||
|
|
||||||
|
|
||||||
|
$arr = gd_info();
|
||||||
|
if (!isset($arr['FreeType Support'])) {
|
||||||
|
echo 'FAIL: FreeType Support array key does not exist.';
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
if ($arr['FreeType Support'] !== TRUE) {
|
||||||
|
echo 'FAIL: No FreeType support.';
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
echo 'OK';
|
||||||
16
tests/mods/modules/gd/gd-xpm.php
Normal file
16
tests/mods/modules/gd/gd-xpm.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This page should print 'OK' if everything works,
|
||||||
|
* 'FAIL' or nothing if an error occured.
|
||||||
|
*/
|
||||||
|
ini_set('display_startup_errors', 1);
|
||||||
|
ini_set('display_errors', 1);
|
||||||
|
error_reporting(-1);
|
||||||
|
|
||||||
|
// Check for XPM support
|
||||||
|
// https://www.php.net/manual/en/function.imagetypes.php
|
||||||
|
if (!(imagetypes() & IMG_XPM)) {
|
||||||
|
echo 'FAIL: No XMP support';
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
echo 'OK';
|
||||||
Reference in New Issue
Block a user