Nobody will ever use this
— Florian Engelhardt
If I have seen further it is only by standing on the shoulders of giants
— Sir Isaac Newton
PHP TestFest 2017
git clone [email protected]:php/php-src.git
cd php-src
./buildconf
./configure
make -j
./sapi/cli/php -v
* fork before cloning
make TEST_PHP_ARGS=-j`nproc` test
=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 47 (gmp, ftp, imap, dl_test, calendar, pspell, snmp, sysvshm, sockets, iconv, sysvmsg, intl, sysvsem, dba, ldap, skeleton, readline, mysqlnd, bz2, pdo_odbc, soap, pdo_mysql, zip, curl, enchant, tidy, oci8, pdo_pgsql, ffi, odbc, gettext, mysqli, exif, pgsql, zend_test, gd, sodium, pcntl, com_dotnet, shmop, openssl, xsl, bcmath, pdo_dblib, pdo_oci, pdo_firebird, mbstring)
Exts tested : 26
---------------------------------------------------------------------
Number of tests : 17774 12397
Tests skipped : 5377 ( 30.3%) --------
Tests warned : 7 ( 0.0%) ( 0.1%)
Tests failed : 0 ( 0.0%) ( 0.0%)
Expected fail : 25 ( 0.1%) ( 0.2%)
Tests passed : 12365 ( 69.6%) ( 99.7%)
---------------------------------------------------------------------
Time taken : 52 seconds
=====================================================================
--TEST--
strlen() function
--EXTENSIONS--
core
--SKIPIF--
<?php
if (!function_exists('strlen')) echo 'skip';
?>
--FILE--
<?php
var_dump(strlen('Hello World!'));
?>
--EXPECT--
int(12)
--CLEAN--
<?php
unlink(__DIR__.'/file.tmp');
?>
https://app.codecov.io/github/php/php-src
ext/zlib/zlib.c
in PHP 7.1
gzip
deflate
--TEST--
zlib_get_coding_type() with gzip encoding
--EXTENSIONS--
zlib
--ENV--
HTTP_ACCEPT_ENCODING=gzip
--FILE--
<?php
ini_set('zlib.output_compression', 'Off');
$off = zlib_get_coding_type();
ini_set('zlib.output_compression', 'On');
$on = zlib_get_coding_type();
ini_set('zlib.output_compression', 'Off');
var_dump($off, $on);
?>
--EXPECT--
bool(false)
string(4) "gzip"
ext/zlib/zlib.c
in PHP 7.3
phpt
test format can be used in
PHPUnit