22Subject: Fix tests
33
44- ext/dom
5- - When running tests from a directory located inside php-src, for
6- example, php-src/php-build relative paths need to be adjusted.
5+ When running tests from a directory located inside php-src, for
6+ example, php-src/php-build relative paths need to be adjusted.
7+
8+ - ext/zip
9+ When PHP is compiled and built agains libzip that doesn't have AES
10+ support enabled (if all encryption options are set to OFF in CMake),
11+ ZipArchive::EM_AES_256 and ZipArchive::EM_AES_192 aren't supported.
712---
8- ext/dom/tests/dom_xinclude.phpt | 4 ++--
9- 1 file changed, 2 insertions(+), 2 deletions(-)
13+ ext/dom/tests/dom_xinclude.phpt | 4 ++--
14+ ext/zip/tests/oo_addglob2.phpt | 6 ++++++
15+ ext/zip/tests/oo_encryption.phpt | 6 ++++++
16+ 3 files changed, 14 insertions(+), 2 deletions(-)
1017
1118diff --git a/ext/dom/tests/dom_xinclude.phpt b/ext/dom/tests/dom_xinclude.phpt
1219index 0dfeb2dfb4a..410431de877 100644
@@ -25,3 +32,37 @@ index 0dfeb2dfb4a..410431de877 100644
2532 <title>The Pearl</title>
2633 <author>John Steinbeck</author>
2734 </book>
35+ diff --git a/ext/zip/tests/oo_addglob2.phpt b/ext/zip/tests/oo_addglob2.phpt
36+ index 517c0b7fd7f..1432d704de5 100644
37+ --- a/ext/zip/tests/oo_addglob2.phpt
38+ +++ b/ext/zip/tests/oo_addglob2.phpt
39+ @@ -6,6 +6,12 @@
40+ <?php
41+ if (!method_exists('ZipArchive', 'setEncryptionName')) die('skip encrytion not supported');
42+ if(!defined("GLOB_BRACE")) die ('skip requires GLOB_BRACE');
43+ + if (
44+ + method_exists('ZipArchive', 'isEncryptionMethodSupported')
45+ + && !ZipArchive::isEncryptionMethodSupported(ZipArchive::EM_AES_256)
46+ + ) {
47+ + die('skip EM_AES_256 encryption not supported');
48+ + }
49+ ?>
50+ --FILE--
51+ <?php
52+ diff --git a/ext/zip/tests/oo_encryption.phpt b/ext/zip/tests/oo_encryption.phpt
53+ index f5207e30759..ccc0a04b8f1 100644
54+ --- a/ext/zip/tests/oo_encryption.phpt
55+ +++ b/ext/zip/tests/oo_encryption.phpt
56+ @@ -5,6 +5,12 @@
57+ --SKIPIF--
58+ <?php
59+ if (!method_exists('ZipArchive', 'setEncryptionName')) die('skip encryption not supported');
60+ + if (
61+ + method_exists('ZipArchive', 'isEncryptionMethodSupported')
62+ + && !ZipArchive::isEncryptionMethodSupported(ZipArchive::EM_AES_256)
63+ + ) {
64+ + die('skip EM_AES_256 encryption not supported');
65+ + }
66+ ?>
67+ --FILE--
68+ <?php
0 commit comments