/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Mysqli::getExtensions * @covers PHP_CompatInfo_Reference_Mysqli::getFunctions * @covers PHP_CompatInfo_Reference_Mysqli::getConstants * @return void */ protected function setUp() { $this->optionalconstants = array('MYSQLI_OPT_NET_CMD_BUFFER_SIZE', 'MYSQLI_OPT_NET_READ_BUFFER_SIZE', 'MYSQLI_OPT_INT_AND_FLOAT_NATIVE', 'MYSQLI_ASYNC', 'MYSQLI_ON_UPDATE_NOW_FLAG', 'MYSQLI_REFRESH_BACKUP_LOG', 'MYSQLI_SERVER_QUERY_WAS_SLOW', 'MYSQLI_SERVER_PS_OUT_PARAMS', 'MYSQLI_OPT_CAN_HANDLE_EXPIRED_PASSWORDS'); $this->optionalfunctions = array('mysqli_embedded_server_end', 'mysqli_embedded_server_start', 'mysqli_fetch_all', 'mysqli_get_cache_stats', 'mysqli_get_connection_stats', 'mysqli_get_client_stats', 'mysqli_set_local_infile_default', 'mysqli_set_local_infile_handler', 'mysqli_poll', 'mysqli_reap_async_query', 'mysqli_stmt_get_result', 'mysqli_stmt_more_results', 'mysqli_stmt_next_result'); $this->obj = new PHP_CompatInfo_Reference_Mysqli(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Sphinx::getExtensions * @covers PHP_CompatInfo_Reference_Sphinx::getFunctions * @return void */ protected function setUp() { // Constants conditionnaly exists (according to libsphinx version) $this->optionalconstants = array('SPH_RANK_EXPR', 'SPH_RANK_FIELDMASK', 'SPH_RANK_MATCHANY', 'SPH_RANK_PROXIMITY', 'SPH_RANK_SPH04', 'SPH_RANK_TOTAL'); $this->obj = new PHP_CompatInfo_Reference_Sphinx(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Odbc::getExtensions * @covers PHP_CompatInfo_Reference_Odbc::getFunctions * @covers PHP_CompatInfo_Reference_Odbc::getConstants * @return void */ protected function setUp() { // This constants require ODBC >= 3.0.0 $this->optionalconstants = array('SQL_TYPE_DATE', 'SQL_TYPE_TIME', 'SQL_TYPE_TIMESTAMP', 'SQL_BEST_ROWID', 'SQL_ROWVER', 'SQL_SCOPE_CURROW', 'SQL_SCOPE_SESSION', 'SQL_SCOPE_TRANSACTION', 'SQL_NO_NULLS', 'SQL_NULLABLE', 'SQL_INDEX_UNIQUE', 'SQL_INDEX_ALL', 'SQL_ENSURE', 'SQL_QUICK'); $this->obj = new PHP_CompatInfo_Reference_Odbc(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Mcrypt::getExtensions * @covers PHP_CompatInfo_Reference_Mcrypt::getFunctions * @covers PHP_CompatInfo_Reference_Mcrypt::getConstants * @return void */ protected function setUp() { $this->optionalconstants = array('MCRYPT_IDEA', 'MCRYPT_DES_COMPAT', 'MCRYPT_RC4', 'MCRYPT_RC6_128', 'MCRYPT_RC6_192', 'MCRYPT_RC6_256', 'MCRYPT_SERPENT_128', 'MCRYPT_SERPENT_192', 'MCRYPT_SERPENT_256', 'MCRYPT_TEAN', 'MCRYPT_TWOFISH128', 'MCRYPT_TWOFISH192', 'MCRYPT_TWOFISH256', 'MCRYPT_ARCFOUR_IV', 'MCRYPT_ARCFOUR', 'MCRYPT_ENIGNA', 'MCRYPT_LOKI97', 'MCRYPT_MARS', 'MCRYPT_PANAMA', 'MCRYPT_RIJNDAEL_128', 'MCRYPT_RIJNDAEL_192', 'MCRYPT_RIJNDAEL_256', 'MCRYPT_RC6', 'MCRYPT_SAFERPLUS', 'MCRYPT_SERPENT', 'MCRYPT_SKIPJACK', 'MCRYPT_TRIPLEDES', 'MCRYPT_TWOFISH', 'MCRYPT_WAKE', 'MCRYPT_XTEA'); $this->ignoredconstants = array('MCRYPT_BLOWFISH_COMPAT'); $this->obj = new PHP_CompatInfo_Reference_Mcrypt(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Ssh2::getExtensions * @covers PHP_CompatInfo_Reference_Ssh2::getFunctions * @return void */ protected function setUp() { $this->optionalfunctions = array('ssh2_forward_accept', 'ssh2_forward_listen', 'ssh2_poll', 'ssh2_auth_agent'); $this->optionalconstants = array('SSH2_POLLIN', 'SSH2_POLLEXT', 'SSH2_POLLOUT', 'SSH2_POLLERR', 'SSH2_POLLHUP', 'SSH2_POLLNVAL', 'SSH2_POLL_SESSION_CLOSED', 'SSH2_POLL_CHANNEL_CLOSED', 'SSH2_POLL_LISTENER_CLOSED'); $this->obj = new PHP_CompatInfo_Reference_Ssh2(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Ldap::getExtensions * @covers PHP_CompatInfo_Reference_Ldap::getFunctions * @covers PHP_CompatInfo_Reference_Ldap::getConstants * @return void */ protected function setUp() { $this->optionalconstants = array('LDAP_OPT_X_SASL_AUTHCID', 'LDAP_OPT_X_SASL_AUTHZID', 'LDAP_OPT_X_SASL_MECH', 'LDAP_OPT_X_SASL_REALM'); $this->optionalfunctions = array('ldap_sasl_bind', 'ldap_set_rebind_proc'); $this->obj = new PHP_CompatInfo_Reference_Ldap(); parent::setUp(); }
/** * Test that each functions are defined in reference * * @group reference * @return void */ public function testGetFunctionsFromExtension() { if (version_compare(PHP_VERSION, '5.3.0') < 0) { $this->markTestSkipped("Can't be tested in php " . PHP_VERSION); } else { parent::testGetFunctionsFromExtension(); } }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_PDFlib::getClasses * @covers PHP_CompatInfo_Reference_PDFlib::getFunctions * @covers PHP_CompatInfo_Reference_PDFlib::getConstants * @return void */ protected function setUp() { // functions only available if PDFLIB_MAJORVERSION >= 8 // so not available with pdflib-lite free library $this->optionalfunctions = array('pdf_add_path_point', 'pdf_add_portfolio_file', 'pdf_add_portfolio_folder', 'pdf_align', 'pdf_begin_dpart', 'pdf_begin_glyph_ext', 'pdf_circular_arc', 'pdf_close_font', 'pdf_close_graphics', 'pdf_convert_to_unicode', 'pdf_delete_path', 'pdf_draw_path', 'pdf_ellipse', 'pdf_elliptical_arc', 'pdf_end_dpart', 'pdf_end_template_ext', 'pdf_fill_graphicsblock', 'pdf_fit_graphics', 'pdf_get_option', 'pdf_get_string', 'pdf_info_graphics', 'pdf_info_image', 'pdf_info_path', 'pdf_info_pdi_page', 'pdf_info_pvf', 'pdf_load_asset', 'pdf_load_graphics', 'pdf_poca_delete', 'pdf_poca_insert', 'pdf_poca_new', 'pdf_poca_remove', 'pdf_set_graphics_option', 'pdf_set_option', 'pdf_set_text_option', 'pdf_utf16_to_utf32', 'pdf_utf8_to_utf16', 'pdf_utf8_to_utf32', 'pdf_utf32_to_utf8'); $this->obj = new PHP_CompatInfo_Reference_PDFlib(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Json::getExtensions * @covers PHP_CompatInfo_Reference_Json::getFunctions * @covers PHP_CompatInfo_Reference_Json::getConstants * @return void */ protected function setUp() { // New features of JSONC alternative extension $this->ignoredconstants = array('JSON_C_BUNDLED', 'JSON_C_VERSION', 'JSON_PARSER_NOTSTRICT'); $this->ignoredclasses = array('JsonIncrementalParser'); $this->obj = new PHP_CompatInfo_Reference_Json(); parent::setUp(); }
/** * Test that each constants are defined in reference * * @group reference * @return void */ public function testGetConstantsFromExtension() { if (version_compare(PHP_VERSION, '5.2.9') <= 0) { // Most functions have move to 'standard' in 5.2.10 $this->markTestSkipped("Can't be tested in php " . PHP_VERSION); } else { parent::testGetConstantsFromExtension(); } }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Gd::getExtensions * @covers PHP_CompatInfo_Reference_Gd::getFunctions * @covers PHP_CompatInfo_Reference_Gd::getConstants * @return void */ protected function setUp() { $this->optionalfunctions = array('imagegrabscreen', 'imagegrabwindow', 'imagecreatefromwebp', 'imagewebp', 'imagecolorclosesthwb', 'imagepsbbox', 'imagepsencodefont', 'imagepsextendfont', 'imagepsfreefont', 'imagepsloadfont', 'imagepsslantfont', 'imagepstext', 'imagecreatefromxpm'); if (defined('GD_BUNDLED') && !GD_BUNDLED) { $this->optionalfunctions[] = 'imageantialias'; } $this->obj = new PHP_CompatInfo_Reference_Gd(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Snmp::getExtensions * @covers PHP_CompatInfo_Reference_Snmp::getFunctions * @covers PHP_CompatInfo_Reference_Snmp::getConstants * @return void */ protected function setUp() { if (DIRECTORY_SEPARATOR == '\\') { // Win32 only $this->optionalconstants = array('SNMP_OID_OUTPUT_FULL', 'SNMP_OID_OUTPUT_NUMERIC'); $this->optionalfunctions = array('snmp_set_enum_print', 'snmp_set_oid_output_format', 'snmp_set_oid_numeric_print'); } $this->obj = new PHP_CompatInfo_Reference_Snmp(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Openssl::getExtensions * @covers PHP_CompatInfo_Reference_Openssl::getFunctions * @covers PHP_CompatInfo_Reference_Openssl::getConstants * @return void */ protected function setUp() { $this->optionalconstants = array('OPENSSL_ALGO_MD2', 'OPENSSL_TLSEXT_SERVER_NAME'); if (defined('OPENSSL_VERSION_NUMBER')) { if (OPENSSL_VERSION_NUMBER < 0x90708f) { $this->optionalconstants = array_merge($this->optionalconstants, array('OPENSSL_ALGO_SHA224', 'OPENSSL_ALGO_SHA256', 'OPENSSL_ALGO_SHA384', 'OPENSSL_ALGO_SHA512', 'OPENSSL_ALGO_RMD160')); } } $this->obj = new PHP_CompatInfo_Reference_Openssl(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Xhprof::getExtensions * @covers PHP_CompatInfo_Reference_Xhprof::getFunctions * @return void */ protected function setUp() { if (PATH_SEPARATOR == ';') { // Win* array_push($this->ignoredconstants, 'XHPROF_FLAGS_LONGNAMES'); } else { // *nix } $this->obj = new PHP_CompatInfo_Reference_Xhprof(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Memcache::getExtensions * @covers PHP_CompatInfo_Reference_Memcache::getFunctions * @covers PHP_CompatInfo_Reference_Memcache::getConstants * @covers PHP_CompatInfo_Reference_Memcache::getClasses * @return void */ protected function setUp() { $this->optionalconstants = array('MEMCACHE_SERIALIZED'); if (DIRECTORY_SEPARATOR == '\\') { // Win32 only $this->optionalfunctions = array('memcache_append', 'memcache_cas', 'memcache_prepend', 'memcache_set_failure_callback'); $this->ignoredfunctions = array('memcache_setoptimeout'); array_push($this->optionalconstants, 'MEMCACHE_USER1', 'MEMCACHE_USER2', 'MEMCACHE_USER3', 'MEMCACHE_USER4'); } $this->obj = new PHP_CompatInfo_Reference_Memcache(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Intl::getExtensions * @covers PHP_CompatInfo_Reference_Intl::getFunctions * @covers PHP_CompatInfo_Reference_Intl::getConstants * @covers PHP_CompatInfo_Reference_Intl::getClasses * @return void */ protected function setUp() { if (PATH_SEPARATOR == ';') { // Win* $this->optionalclasses = array('IntlException'); } if (version_compare(PHP_VERSION, '5.4.0', 'lt') && PATH_SEPARATOR == ';') { $this->optionalconstants = array('U_IDNA_PROHIBITED_ERROR', 'U_IDNA_ERROR_START', 'U_IDNA_UNASSIGNED_ERROR', 'U_IDNA_CHECK_BIDI_ERROR', 'U_IDNA_STD3_ASCII_RULES_ERROR', 'U_IDNA_ACE_PREFIX_ERROR', 'U_IDNA_VERIFICATION_ERROR', 'U_IDNA_LABEL_TOO_LONG_ERROR', 'U_IDNA_ZERO_LENGTH_LABEL_ERROR', 'U_IDNA_ERROR_LIMIT'); } $this->obj = new PHP_CompatInfo_Reference_Intl(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Apc::getExtensions * @covers PHP_CompatInfo_Reference_Apc::getFunctions * @covers PHP_CompatInfo_Reference_Apc::getClasses * @return void */ protected function setUp() { // Constants and Classes not available in CLI mode $this->optionalconstants = array('APC_LIST_ACTIVE', 'APC_LIST_DELETED', 'APC_ITER_TYPE', 'APC_ITER_KEY', 'APC_ITER_FILENAME', 'APC_ITER_DEVICE', 'APC_ITER_INODE', 'APC_ITER_VALUE', 'APC_ITER_MD5', 'APC_ITER_NUM_HITS', 'APC_ITER_MTIME', 'APC_ITER_CTIME', 'APC_ITER_DTIME', 'APC_ITER_ATIME', 'APC_ITER_REFCOUNT', 'APC_ITER_MEM_SIZE', 'APC_ITER_TTL', 'APC_ITER_NONE', 'APC_ITER_ALL', 'APC_BIN_VERIFY_MD5', 'APC_BIN_VERIFY_CRC32'); $this->optionalclasses = array('APCIterator'); if (extension_loaded('apcu')) { // APCu is a drop in replacement for APC // present as "apc" but only provides user data cache functions $this->optionalfunctions = array('apc_define_constants', 'apc_load_constants', 'apc_compile_file', 'apc_delete_file'); } $this->obj = new PHP_CompatInfo_Reference_Apc(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Zend_OPcache::getFunctions * @return void */ protected function setUp() { $extversion = phpversion(PHP_CompatInfo_Reference_ZendOPcache::REF_NAME); if (PATH_SEPARATOR == ';') { // Win* if ('7.0.2FE' === $extversion) { array_push($this->ignoredfunctions, 'opcache_invalidate'); } } else { // *nix } $this->obj = new PHP_CompatInfo_Reference_ZendOPcache(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Sockets::getExtensions * @covers PHP_CompatInfo_Reference_Sockets::getFunctions * @covers PHP_CompatInfo_Reference_Sockets::getConstants * @return void */ protected function setUp() { if (PATH_SEPARATOR == ':') { $this->optionalconstants = array('SOCKET_EDISCON', 'SOCKET_EPROCLIM', 'SOCKET_ESTALE', 'SOCKET_HOST_NOT_FOUND', 'SOCKET_NOTINITIALISED', 'SOCKET_NO_ADDRESS', 'SOCKET_NO_DATA', 'SOCKET_NO_RECOVERY', 'SOCKET_SYSNOTREADY', 'SOCKET_TRY_AGAIN', 'SOCKET_VERNOTSUPPORTED'); } else { $this->optionalconstants = array('SOCKET_E2BIG', 'SOCKET_EADV', 'SOCKET_EAGAIN', 'SOCKET_EBADE', 'SOCKET_EBADFD', 'SOCKET_EBADMSG', 'SOCKET_EBADR', 'SOCKET_EBADRQC', 'SOCKET_EBADSLT', 'SOCKET_EBUSY', 'SOCKET_ECHRNG', 'SOCKET_ECOMM', 'SOCKET_EEXIST', 'SOCKET_EIDRM', 'SOCKET_EIO', 'SOCKET_EISDIR', 'SOCKET_EISNAM', 'SOCKET_EL2HLT', 'SOCKET_EL2NSYNC', 'SOCKET_EL3HLT', 'SOCKET_EL3RST', 'SOCKET_ELNRNG', 'SOCKET_EMEDIUMTYPE', 'SOCKET_EMLINK', 'SOCKET_EMULTIHOP', 'SOCKET_ENFILE', 'SOCKET_ENOANO', 'SOCKET_ENOCSI', 'SOCKET_ENODATA', 'SOCKET_ENODEV', 'SOCKET_ENOENT', 'SOCKET_ENOLCK', 'SOCKET_ENOLINK', 'SOCKET_ENOMEDIUM', 'SOCKET_ENOMEM', 'SOCKET_ENOMSG', 'SOCKET_ENONET', 'SOCKET_ENOSPC', 'SOCKET_ENOSR', 'SOCKET_ENOSTR', 'SOCKET_ENOSYS', 'SOCKET_ENOTBLK', 'SOCKET_ENOTDIR', 'SOCKET_ENOTTY', 'SOCKET_ENOTUNIQ', 'SOCKET_ENXIO', 'SOCKET_EPERM', 'SOCKET_EPIPE', 'SOCKET_EPROTO', 'SOCKET_EREMCHG', 'SOCKET_EREMOTEIO', 'SOCKET_ERESTART', 'SOCKET_EROFS', 'SOCKET_ESPIPE', 'SOCKET_ESRMNT', 'SOCKET_ESTRPIPE', 'SOCKET_ETIME', 'SOCKET_EUNATCH', 'SOCKET_EXDEV', 'SOCKET_EXFULL'); } // Common to Windows and Unix // (from ext/sockets/ win32_socket_constants.h and unix_socket_constants.h) $tmp = array('SOCKET_EACCES', 'SOCKET_EADDRINUSE', 'SOCKET_EADDRNOTAVAIL', 'SOCKET_EAFNOSUPPORT', 'SOCKET_EALREADY', 'SOCKET_EBADF', 'SOCKET_ECONNABORTED', 'SOCKET_ECONNREFUSED', 'SOCKET_ECONNRESET', 'SOCKET_EDESTADDRREQ', 'SOCKET_EDQUOT', 'SOCKET_EFAULT', 'SOCKET_EHOSTDOWN', 'SOCKET_EHOSTUNREACH', 'SOCKET_EINPROGRESS', 'SOCKET_EINTR', 'SOCKET_EINVAL', 'SOCKET_EISCONN', 'SOCKET_ELOOP', 'SOCKET_EMFILE', 'SOCKET_EMSGSIZE', 'SOCKET_ENAMETOOLONG', 'SOCKET_ENETDOWN', 'SOCKET_ENETRESET', 'SOCKET_ENETUNREACH', 'SOCKET_ENOBUFS', 'SOCKET_ENOPROTOOPT', 'SOCKET_ENOTCONN', 'SOCKET_ENOTEMPTY', 'SOCKET_ENOTSOCK', 'SOCKET_EOPNOTSUPP', 'SOCKET_EPFNOSUPPORT', 'SOCKET_EPROTONOSUPPORT', 'SOCKET_EPROTOTYPE', 'SOCKET_EREMOTE', 'SOCKET_ESHUTDOWN', 'SOCKET_ESOCKTNOSUPPORT', 'SOCKET_ETIMEDOUT', 'SOCKET_ETOOMANYREFS', 'SOCKET_EUSERS', 'SOCKET_EWOULDBLOCK', 'IPV6_RECVPKTINFO', 'IPV6_PKTINFO', 'IPV6_RECVHOPLIMIT', 'IPV6_HOPLIMIT', 'IPV6_RECVTCLASS', 'IPV6_TCLASS', 'SCM_CREDENTIALS', 'SCM_RIGHTS', 'SO_PASSCRED', 'AF_INET6', 'MSG_EOR', 'MSG_EOF', 'MSG_CONFIRM', 'MSG_ERRQUEUE', 'MSG_NOSIGNAL', 'MSG_DONTWAIT', 'MSG_MORE', 'MSG_WAITFORONE', 'MSG_CMSG_CLOEXEC', 'SO_BINDTODEVICE', 'SO_REUSEPORT', 'SO_FAMILY', 'TCP_NODELAY', 'MCAST_BLOCK_SOURCE', 'MCAST_UNBLOCK_SOURCE', 'MCAST_JOIN_SOURCE_GROUP', 'MCAST_LEAVE_SOURCE_GROUP', 'IPV6_MULTICAST_IF', 'IPV6_MULTICAST_HOPS', 'IPV6_MULTICAST_LOOP', 'IPPROTO_IPV6', 'IPV6_UNICAST_HOPS'); $this->optionalconstants = array_merge($this->optionalconstants, $tmp); $this->optionalfunctions = array('socket_create_pair'); $this->obj = new PHP_CompatInfo_Reference_Sockets(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Fileinfo::getExtensions * @covers PHP_CompatInfo_Reference_Fileinfo::getFunctions * @covers PHP_CompatInfo_Reference_Fileinfo::getConstants * @return void */ protected function setUp() { $extversion = phpversion(PHP_CompatInfo_Reference_Fileinfo::REF_NAME); if (PATH_SEPARATOR == ';') { // Win* if ('1.0.5-dev' === $extversion) { array_push($this->ignoredfunctions, 'mime_content_type'); array_push($this->ignoredconstants, 'FILEINFO_MIME_ENCODING', 'FILEINFO_MIME_TYPE'); } } else { // *nix } $this->obj = new PHP_CompatInfo_Reference_Fileinfo(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Xdebug::getExtensions * @covers PHP_CompatInfo_Reference_Xdebug::getFunctions * @covers PHP_CompatInfo_Reference_Xdebug::getClasses * @return void */ protected function setUp() { $extname = 'xdebug'; if (extension_loaded($extname)) { if (version_compare(phpversion($extname), '2.0.0beta1', 'ge')) { // removed functions in 2.0.0beta1 $this->optionalfunctions = array_merge($this->optionalfunctions, array('xdebug_get_function_trace', 'xdebug_dump_function_trace')); } if (version_compare(phpversion($extname), '2.0.0RC1', 'ge')) { // removed functions in 2.0.0RC1 $this->optionalfunctions = array_merge($this->optionalfunctions, array('xdebug_set_error_handler')); } } $this->obj = new PHP_CompatInfo_Reference_Xdebug(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Libevent::getClasses * @covers PHP_CompatInfo_Reference_Libevent::getFunctions * @covers PHP_CompatInfo_Reference_Libevent::getConstants * @return void */ protected function setUp() { $extversion = phpversion(PHP_CompatInfo_Reference_Libevent::REF_NAME); if (PATH_SEPARATOR == ';') { // Win* if ('0.0.4' === $extversion) { // only available since version 0.0.5 array_push($this->ignoredfunctions, 'event_priority_set'); } array_push($this->optionalfunctions, 'event_base_reinit'); } else { // *nix } $this->obj = new PHP_CompatInfo_Reference_Libevent(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Standard::getExtensions * @covers PHP_CompatInfo_Reference_Standard::getFunctions * @covers PHP_CompatInfo_Reference_Standard::getConstants * @covers PHP_CompatInfo_Reference_Standard::getClasses * @return void */ protected function setUp() { $this->ignoredfunctions = array('ereg_replace', 'ereg', 'eregi_replace', 'eregi', 'split', 'spliti', 'sql_regcase'); if (DIRECTORY_SEPARATOR == '/') { $this->optionalfunctions = array('chroot', 'php_egg_logo_guid'); } else { $this->optionalfunctions = array('nl_langinfo', 'strptime', 'money_format', 'getrusage', 'chroot', 'ftok', 'proc_nice', 'sys_getloadavg', 'lchgrp', 'lchown', 'acosh', 'asinh', 'atanh', 'dns_check_record', 'dns_get_mx', 'dns_get_record', 'expm1', 'log1p', 'checkdnsrr', 'fnmatch', 'getmxrr', 'getopt', 'inet_ntop', 'inet_pton', 'link', 'linkinfo', 'readlink', 'stream_socket_pair', 'symlink', 'time_nanosleep', 'time_sleep_until'); if (php_sapi_name() != 'cli') { // dl function still exists in CLI but was removed from other SAPI since PHP 5.3 array_push($this->optionalfunctions, 'dl'); } $this->optionalconstants = array('LOG_LOCAL0', 'LOG_LOCAL1', 'LOG_LOCAL2', 'LOG_LOCAL3', 'LOG_LOCAL4', 'LOG_LOCAL5', 'LOG_LOCAL6', 'LOG_LOCAL7', 'FNM_NOESCAPE', 'FNM_PATHNAME', 'FNM_PERIOD', 'FNM_CASEFOLD', 'LC_MESSAGES', 'ABDAY_1', 'ABDAY_2', 'ABDAY_3', 'ABDAY_4', 'ABDAY_5', 'ABDAY_6', 'ABDAY_7', 'DAY_1', 'DAY_2', 'DAY_3', 'DAY_4', 'DAY_5', 'DAY_6', 'DAY_7', 'ABMON_1', 'ABMON_2', 'ABMON_3', 'ABMON_4', 'ABMON_5', 'ABMON_6', 'ABMON_7', 'ABMON_8', 'ABMON_9', 'ABMON_10', 'ABMON_11', 'ABMON_12', 'MON_1', 'MON_2', 'MON_3', 'MON_4', 'MON_5', 'MON_6', 'MON_7', 'MON_8', 'MON_9', 'MON_10', 'MON_11', 'MON_12', 'AM_STR', 'PM_STR', 'D_T_FMT', 'D_FMT', 'T_FMT', 'T_FMT_AMPM', 'ERA', 'ERA_D_T_FMT', 'ERA_D_FMT', 'ERA_T_FMT', 'ALT_DIGITS', 'CRNCYSTR', 'RADIXCHAR', 'THOUSEP', 'YESEXPR', 'NOEXPR', 'CODESET', 'DNS_A', 'DNS_NS', 'DNS_CNAME', 'DNS_SOA', 'DNS_PTR', 'DNS_HINFO', 'DNS_MX', 'DNS_TXT', 'DNS_SRV', 'DNS_NAPTR', 'DNS_AAAA', 'DNS_A6', 'DNS_ANY', 'DNS_ALL', 'STREAM_IPPROTO_TCP', 'STREAM_IPPROTO_UDP', 'STREAM_IPPROTO_ICMP', 'STREAM_IPPROTO_RAW'); } $this->obj = new PHP_CompatInfo_Reference_Standard(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Amqp::getClasses * @covers PHP_CompatInfo_Reference_Amqp::getConstants * @return void */ protected function setUp() { $extversion = phpversion(PHP_CompatInfo_Reference_Amqp::REF_NAME); if (PATH_SEPARATOR == ';') { // Win* if ('0.1' === $extversion) { // only available since version 1.0.8 array_push($this->ignoredconstants, 'AMQP_OS_SOCKET_TIMEOUT_ERRNO'); // only available since version 1.0.0 array_push($this->ignoredclasses, 'AMQPChannel', 'AMQPChannelException', 'AMQPEnvelope'); } } else { // *nix } $this->obj = new PHP_CompatInfo_Reference_Amqp(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Mongo::getExtensions * @covers PHP_CompatInfo_Reference_Mongo::getFunctions * @covers PHP_CompatInfo_Reference_Mongo::getClasses * @return void */ protected function setUp() { $this->optionalclasses = array('MongoUtil'); /* On windows PHP 5.2 latest version is 1.2.0, while PHP 5.3 latest version is 1.2.7 */ // classes available since 1.2.3 array_push($this->optionalclasses, 'MongoLog', 'MongoPool'); // classes available since 1.3.0 array_push($this->optionalclasses, 'MongoClient', 'MongoResultException'); // found on windows 1.2.0 version but not declared in any sources $this->ignoredfunctions = array('mongoPoolDebug'); $this->obj = new PHP_CompatInfo_Reference_Mongo(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Libxml::getExtensions * @covers PHP_CompatInfo_Reference_Libxml::getFunctions * @covers PHP_CompatInfo_Reference_Libxml::getConstants * @covers PHP_CompatInfo_Reference_Libxml::getClasses * @return void */ protected function setUp() { $this->optionalconstants = array(); if (defined('LIBXML_VERSION')) { if (LIBXML_VERSION < 20703) { $this->optionalconstants[] = 'LIBXML_PARSEHUGE'; } if (LIBXML_VERSION < 20707) { $this->optionalconstants[] = 'LIBXML_HTML_NOIMPLIED'; } if (LIBXML_VERSION < 20708) { $this->optionalconstants[] = 'LIBXML_HTML_NODEFDTD'; } } if (DIRECTORY_SEPARATOR == '/') { } else { $this->optionalconstants = array('LIBXML_HTML_NODEFDTD', 'LIBXML_HTML_NOIMPLIED'); } $this->obj = new PHP_CompatInfo_Reference_Libxml(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Hash::getExtensions * @covers PHP_CompatInfo_Reference_Hash::getFunctions * @covers PHP_CompatInfo_Reference_Hash::getConstants * @return void */ protected function setUp() { $mhashconstants = array('MHASH_CRC32', 'MHASH_MD5', 'MHASH_SHA1', 'MHASH_HAVAL256', 'MHASH_RIPEMD160', 'MHASH_TIGER', 'MHASH_GOST', 'MHASH_CRC32B', 'MHASH_HAVAL224', 'MHASH_HAVAL192', 'MHASH_HAVAL160', 'MHASH_HAVAL128', 'MHASH_TIGER128', 'MHASH_TIGER160', 'MHASH_MD4', 'MHASH_SHA256', 'MHASH_ADLER32', 'MHASH_SHA224', 'MHASH_SHA512', 'MHASH_SHA384', 'MHASH_WHIRLPOOL', 'MHASH_RIPEMD128', 'MHASH_RIPEMD256', 'MHASH_RIPEMD320', 'MHASH_SNEFRU256', 'MHASH_MD2', 'MHASH_FNV132', 'MHASH_FNV1A32', 'MHASH_FNV164', 'MHASH_FNV1A64', 'MHASH_JOAAT'); $mhashfunctions = array('mhash', 'mhash_count', 'mhash_get_block_size', 'mhash_get_hash_name', 'mhash_keygen_s2k'); // Since php 5.3.0 mhash is emulated by hash ext. // So this constants/functions are reported in "hash" if (version_compare(PHP_VERSION, '5.3.0', 'ge')) { if (!extension_loaded('mash')) { // Only available if hash emulates mhash // so will not be found, while in reference $this->optionalfunctions =& $mhashfunctions; $this->optionalconstants =& $mhashconstants; } } else { if (extension_loaded('mash')) { // Provided by mhash, not by hash // so will be detected, while not in reference $this->ignoredfunctions =& $mhashfunctions; $this->ignoredconstants =& $mhashconstants; } } $this->obj = new PHP_CompatInfo_Reference_Hash(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Xml::getExtensions * @covers PHP_CompatInfo_Reference_Xml::getConstants * @covers PHP_CompatInfo_Reference_Xml::getFunctions * @return void */ protected function setUp() { $this->obj = new PHP_CompatInfo_Reference_Xml(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Geoip::getExtensions * @covers PHP_CompatInfo_Reference_Geoip::getFunctions * @covers PHP_CompatInfo_Reference_Geoip::getConstants * @return void */ protected function setUp() { $this->optionalfunctions = array('geoip_region_name_by_code', 'geoip_time_zone_by_country_and_region'); $this->obj = new PHP_CompatInfo_Reference_Geoip(); parent::setUp(); }
/** * Sets up the fixture. * * @covers PHP_CompatInfo_Reference_Tokenizer::getExtensions * @covers PHP_CompatInfo_Reference_Tokenizer::getFunctions * @covers PHP_CompatInfo_Reference_Tokenizer::getConstants * @return void */ protected function setUp() { $this->ignoredconstants = array('T_NAMESPACE', 'T_USE'); $this->obj = new PHP_CompatInfo_Reference_Tokenizer(); parent::setUp(); }