summaryrefslogtreecommitdiff
path: root/ext/posix
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2017-02-02 00:57:40 +0100
committerNikita Popov <nikita.ppv@gmail.com>2017-02-02 00:58:04 +0100
commitfb008bf60e88e9bef10860322d1fa59d8e53b8f6 (patch)
tree54aad9846f608e85b27f07a7a7cff8a07451490a /ext/posix
parentac16d944bb571cd6b9e0fe27f5b03b64ddaeec55 (diff)
downloadphp-git-fb008bf60e88e9bef10860322d1fa59d8e53b8f6.tar.gz
Remove obsolete version checks from tests
Diffstat (limited to 'ext/posix')
-rw-r--r--ext/posix/tests/posix_access.phpt52
-rw-r--r--ext/posix/tests/posix_access_error_modes.phpt46
-rw-r--r--ext/posix/tests/posix_access_error_wrongparams.phpt44
-rw-r--r--ext/posix/tests/posix_access_safemode.phpt25
-rw-r--r--ext/posix/tests/posix_mkfifo_safemode.phpt45
5 files changed, 0 insertions, 212 deletions
diff --git a/ext/posix/tests/posix_access.phpt b/ext/posix/tests/posix_access.phpt
deleted file mode 100644
index 47b5e15f0b..0000000000
--- a/ext/posix/tests/posix_access.phpt
+++ /dev/null
@@ -1,52 +0,0 @@
---TEST--
-Test posix_access() function test
---DESCRIPTION--
-checks for existence, read-access, write-access, execute-access
---CREDITS--
-Moritz Neuhaeuser, info@xcompile.net
-PHP Testfest Berlin 2009-05-10
---SKIPIF--
-<?php
-if (!extension_loaded('posix')) {
- die('SKIP The posix extension is not loaded.');
-}
-if (posix_geteuid() == 0) {
- die('SKIP Cannot run test as root.');
-}
-if (PHP_VERSION_ID < 503099) {
- die('SKIP Safe mode is no longer available.');
-}
-?>
---FILE--
-<?php
-$filename = dirname(__FILE__) . '/foo.test';
-$fp = fopen($filename,"w");
-fwrite($fp,"foo");
-fclose($fp);
-
-chmod ($filename, 0000);
-var_dump(posix_access($filename, POSIX_F_OK));
-
-chmod ($filename, 0400);
-var_dump(posix_access($filename, POSIX_R_OK));
-
-chmod ($filename, 0600);
-var_dump(posix_access($filename, POSIX_W_OK));
-
-chmod ($filename, 0700);
-var_dump(posix_access($filename, POSIX_X_OK));
-?>
-===DONE===
---CLEAN--
-<?php
-$filename = dirname(__FILE__) . '/foo.test';
-chmod ($filename, 0700);
-unlink($filename);
-?>
---EXPECTF--
-Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in %s on line %d
-bool(true)
-bool(true)
-bool(true)
-bool(true)
-===DONE===
diff --git a/ext/posix/tests/posix_access_error_modes.phpt b/ext/posix/tests/posix_access_error_modes.phpt
deleted file mode 100644
index fb04e34683..0000000000
--- a/ext/posix/tests/posix_access_error_modes.phpt
+++ /dev/null
@@ -1,46 +0,0 @@
---TEST--
-Test posix_access() function test error conditions
---DESCRIPTION--
-checks if posix_access() failes for wrong permissions
---CREDITS--
-Moritz Neuhaeuser, info@xcompile.net
-PHP Testfest Berlin 2009-05-10
---SKIPIF--
-<?php
-if (!extension_loaded('posix')) {
- die('SKIP The posix extension is not loaded.');
-}
-if (posix_geteuid() == 0) {
- die('SKIP Cannot run test as root.');
-}
-if (PHP_VERSION_ID < 503099) {
- die('SKIP Safe mode is no longer available.');
-}
-?>
---FILE--
-<?php
-$filename = dirname(__FILE__) . '/foo.test';
-var_dump(posix_access($filename, POSIX_F_OK));
-$fp = fopen($filename,"w");
-fwrite($fp,"foo");
-fclose($fp);
-
-chmod ($filename, 0000);
-var_dump(posix_access($filename, POSIX_R_OK));
-var_dump(posix_access($filename, POSIX_W_OK));
-var_dump(posix_access($filename, POSIX_X_OK));
-?>
-===DONE===
---CLEAN--
-<?php
-$filename = dirname(__FILE__) . '/foo.test';
-chmod ($filename, 0700);
-unlink($filename);
-?>
---EXPECTF--
-WDeprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line %d
-bool(false)
-bool(false)
-bool(false)
-bool(false)
-===DONE===
diff --git a/ext/posix/tests/posix_access_error_wrongparams.phpt b/ext/posix/tests/posix_access_error_wrongparams.phpt
deleted file mode 100644
index dcab33c4a7..0000000000
--- a/ext/posix/tests/posix_access_error_wrongparams.phpt
+++ /dev/null
@@ -1,44 +0,0 @@
---TEST--
-Test posix_access() function : parameter validation
---DESCRIPTION--
-cases: no params, wrong param1, wrong param2, null directory, wrong directory,
---CREDITS--
-Moritz Neuhaeuser, info@xcompile.net
-PHP Testfest Berlin 2009-05-10
---SKIPIF--
-<?php
-if (!extension_loaded('posix')) {
- die('SKIP The posix extension is not loaded.');
-}
-if (posix_geteuid() == 0) {
- die('SKIP Cannot run test as root.');
-}
-if (PHP_VERSION_ID < 503099) {
- die('SKIP Safe mode is no longer available.');
-}
-?>
---FILE--
-<?php
-
-var_dump( posix_access() );
-var_dump( posix_access(array()) );
-var_dump( posix_access('foo',array()) );
-var_dump( posix_access(null) );
-
-var_dump(posix_access('./foobar'));
-?>
-===DONE===
---EXPECTF--
-Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0
-
-Warning: posix_access() expects at least 1 parameter, 0 given in %s on line %d
-bool(false)
-
-Warning: posix_access() expects parameter 1 to be string, array given in %s on line %d
-bool(false)
-
-Warning: posix_access() expects parameter 2 to be integer, array given in %s on line %d
-bool(false)
-bool(false)
-bool(false)
-===DONE===
diff --git a/ext/posix/tests/posix_access_safemode.phpt b/ext/posix/tests/posix_access_safemode.phpt
deleted file mode 100644
index b726b4fdbb..0000000000
--- a/ext/posix/tests/posix_access_safemode.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-Test posix_access() with safe_mode enabled.
---CREDITS--
-Till Klampaeckel, till@php.net
-TestFest Berlin 2009
---SKIPIF--
-<?php
-if (!extension_loaded('posix')) {
- die('SKIP The posix extension is not loaded.');
-}
-if (posix_geteuid() == 0) {
- die('SKIP Cannot run test as root.');
-}
-if (PHP_VERSION_ID < 503099) {
- die('SKIP Safe mode is no longer available.');
-}
---FILE--
-<?php
-var_dump(posix_access('/tmp', POSIX_W_OK));
-?>
-===DONE===
---EXPECTF--
-Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/posix/tests/posix_mkfifo_safemode.phpt b/ext/posix/tests/posix_mkfifo_safemode.phpt
deleted file mode 100644
index 1126c00df0..0000000000
--- a/ext/posix/tests/posix_mkfifo_safemode.phpt
+++ /dev/null
@@ -1,45 +0,0 @@
---TEST--
-Test posix_mkfifo() with safe_mode.
---DESCRIPTION--
-The test attempts to enable safe_mode, catches all the relevant E_WARNING's and tries to create a fifo in /tmp.
-
-The first attempt (writing to /tmp) should effectively fail because /tmp is owned by root.
-
-The second attempt (writing to a local created file) works.
---CREDITS--
-Till Klampaeckel, till@php.net
-TestFest Berlin 2009
---SKIPIF--
-<?php
-if (!extension_loaded('posix')) {
- die('SKIP The posix extension is not loaded.');
-}
-if (posix_geteuid() == 0) {
- die('SKIP Cannot run test as root.');
-}
-if (PHP_VERSION_ID < 503099) {
- die('SKIP Safe mode is no longer available.');
-}
-?>
---FILE--
-<?php
-var_dump(posix_mkfifo('/tmp/foobar', 0644));
-
-$dir = dirname(__FILE__) . '/foo';
-mkdir ($dir);
-var_dump(posix_mkfifo($dir . '/bar', 0644));
-?>
-===DONE===
---CLEAN--
-<?php
-$dir = dirname(__FILE__) . '/foo';
-unlink($dir . '/bar');
-rmdir($dir);
-?>
---EXPECTF--
-Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in %s on line %d
-
-Warning: posix_mkfifo(): SAFE MODE Restriction in effect. The script whose uid is %d is not allowed to access /tmp owned by uid %d in %s on line %d
-bool(false)
-bool(true)
-===DONE===