xref: /php-src/ext/gd/tests/gh10344.phpt (revision 4a487294)
1--TEST--
2GH-10344 (imagettfbbox(): Could not find/open font UNC path)
3--EXTENSIONS--
4gd
5--SKIPIF--
6<?php
7if (PHP_OS_FAMILY != 'Windows') {
8    die("skip windows only test");
9}
10if (!GD_BUNDLED) {
11    die("skip Not (yet) fixed in libgd itself");
12}
13if (!function_exists("imagettfbbox")) {
14    die("skip ttf support unavailable");
15}
16if (!is_readable("\\\\localhost\\c$\\Windows\\Fonts\\arial.ttf")) {
17    die("skip font not readable");
18}
19?>
20--FILE--
21<?php
22
23$font = '\\\\localhost\\c$\\Windows\\Fonts\\arial.ttf';
24var_dump(count(imagettfbbox(10, 0, $font, 'hello')));
25
26?>
27--EXPECT--
28int(8)
29