Annotation of embedaddon/php/ext/posix/tests/posix_access_safemode.phpt, revision 1.1.1.2

1.1       misho       1: --TEST--
                      2: Test posix_access() with safe_mode enabled.
                      3: --CREDITS--
                      4: Till Klampaeckel, till@php.net
                      5: TestFest Berlin 2009
                      6: --SKIPIF--
                      7: <?php
                      8: if (!extension_loaded('posix')) {
                      9:     die('SKIP The posix extension is not loaded.');
                     10: }
                     11: if (posix_geteuid() == 0) {
                     12:     die('SKIP Cannot run test as root.');
                     13: }
1.1.1.2 ! misho      14: if (PHP_VERSION_ID < 503099) {
        !            15:     die('SKIP Safe mode is no longer available.');
        !            16: }
1.1       misho      17: --FILE--
                     18: <?php
                     19: var_dump(posix_access('/tmp', POSIX_W_OK));
                     20: ?>
                     21: ===DONE===
                     22: --EXPECTF--
                     23: Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in %s on line %d
                     24: bool(false)
                     25: ===DONE===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>