diff --git a/ext/ftp/tests/007.phpt b/ext/ftp/tests/007.phpt deleted file mode 100644 index 38eb20badd7f..000000000000 --- a/ext/ftp/tests/007.phpt +++ /dev/null @@ -1,214 +0,0 @@ ---TEST-- -FTP with bogus resource ---CREDITS-- -Michael Paul da Rosa -PHP TestFest Dublin 2017 ---EXTENSIONS-- -ftp -pcntl ---FILE-- -getMessage(), "\n"; -} -try { - var_dump(ftp_pwd($ftp)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_cdup($ftp)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_chdir($ftp, '~')); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_exec($ftp, 'x')); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_raw($ftp, 'x')); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_mkdir($ftp, '/')); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_rmdir($ftp, '/')); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_chmod($ftp, 7777, '/')); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_alloc($ftp, 7777)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_nlist($ftp, '/')); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_rawlist($ftp, '~')); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_mlsd($ftp, '~')); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_systype($ftp)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_fget($ftp, $ftp, 'remote', 7777)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_nb_fget($ftp, $ftp, 'remote', 7777)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_pasv($ftp, false)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_get($ftp, 'local', 'remote', 7777)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_nb_get($ftp, 'local', 'remote', 7777)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_nb_continue($ftp)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_fput($ftp, 'remote', $ftp, 9999)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_nb_fput($ftp, 'remote', $ftp, 9999)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_put($ftp, 'remote', 'local', 9999)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_append($ftp, 'remote', 'local', 9999)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_nb_put($ftp, 'remote', 'local', 9999)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_size($ftp, '~')); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_mdtm($ftp, '~')); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_rename($ftp, 'old', 'new')); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_delete($ftp, 'gone')); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_site($ftp, 'localhost')); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_close($ftp)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_set_option($ftp, 1, 2)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} -try { - var_dump(ftp_get_option($ftp, 1)); -} catch (TypeError $e) { - echo $e::class, ': ', $e->getMessage(), "\n"; -} - -fclose($ftp); -?> ---EXPECT-- -TypeError: ftp_login(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_pwd(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_cdup(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_chdir(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_exec(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_raw(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_mkdir(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_rmdir(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_chmod(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_alloc(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_nlist(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_rawlist(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_mlsd(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_systype(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_fget(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_nb_fget(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_pasv(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_get(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_nb_get(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_nb_continue(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_fput(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_nb_fput(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_put(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_append(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_nb_put(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_size(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_mdtm(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_rename(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_delete(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_site(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_close(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_set_option(): Argument #1 ($ftp) must be of type FTP\Connection, resource given -TypeError: ftp_get_option(): Argument #1 ($ftp) must be of type FTP\Connection, resource given diff --git a/ext/readline/tests/readline_callback_handler_install_001.phpt b/ext/readline/tests/readline_callback_handler_install_001.phpt index d6602403ae05..4c29b0276c37 100644 --- a/ext/readline/tests/readline_callback_handler_install_001.phpt +++ b/ext/readline/tests/readline_callback_handler_install_001.phpt @@ -14,13 +14,7 @@ function foo() { } var_dump(readline_callback_handler_install('testing: ', 'foo')); -try { - var_dump(readline_callback_handler_install('testing: ', 'foobar!')); -} catch (\TypeError $e) { - echo $e::class, ': ', $e->getMessage(), PHP_EOL; -} ?> --EXPECT-- testing: bool(true) -TypeError: readline_callback_handler_install(): Argument #2 ($callback) must be a valid callback, function "foobar!" not found or invalid function name diff --git a/ext/zlib/tests/deflate_add_error.phpt b/ext/zlib/tests/deflate_add_error.phpt index b4fc42aaf31f..480112738499 100644 --- a/ext/zlib/tests/deflate_add_error.phpt +++ b/ext/zlib/tests/deflate_add_error.phpt @@ -4,13 +4,6 @@ Test incremental deflate_add() error functionality zlib --FILE-- getMessage(), PHP_EOL; -} $resource = deflate_init(ZLIB_ENCODING_DEFLATE); $badFlushType = 6789; @@ -23,5 +16,4 @@ try { ?> --EXPECT-- -TypeError: deflate_add(): Argument #1 ($context) must be of type DeflateContext, resource given ValueError: deflate_add(): Argument #3 ($flush_mode) must be one of ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH, ZLIB_SYNC_FLUSH, ZLIB_FULL_FLUSH, ZLIB_BLOCK, or ZLIB_FINISH diff --git a/ext/zlib/tests/inflate_add_error.phpt b/ext/zlib/tests/inflate_add_error.phpt index 1d805ba5f9d2..7d44d0d6c175 100644 --- a/ext/zlib/tests/inflate_add_error.phpt +++ b/ext/zlib/tests/inflate_add_error.phpt @@ -5,13 +5,6 @@ zlib --FILE-- getMessage(), PHP_EOL; -} - $resource = inflate_init(ZLIB_ENCODING_DEFLATE); $badFlushType = 6789; try { @@ -22,5 +15,4 @@ try { ?> --EXPECT-- -TypeError: inflate_add(): Argument #1 ($context) must be of type InflateContext, resource given ValueError: inflate_add(): Argument #3 ($flush_mode) must be one of ZLIB_NO_FLUSH, ZLIB_PARTIAL_FLUSH, ZLIB_SYNC_FLUSH, ZLIB_FULL_FLUSH, ZLIB_BLOCK, or ZLIB_FINISH