--TEST-- tests extraction of out-of-path symlink --SKIPIF-- --FILE-- extract($extract_target); // On Windows dirname() will have used backslashes but the error messages do not. $extract_target = str_replace('\\', '/', $extract_target); $phpunit->assertErrors(array(array('package' => 'PEAR_Error', 'message' => 'Out-of-path file extraction {' . $extract_target . '/five/six/evil.txt --> ../../../../secret.txt}')), 'after 1'); $phpunit->assertFileNotExists($extract_target . '/five/six/evil.txt', 'Out-of-path symlink should not have succeeded'); echo 'tests done'; ?> --CLEAN-- --EXPECT-- tests done