====== PHP TestFest 2010 ======
//This page contains out-dated material and is archived here for infor... r recent information, see the [[qa:testfest| main PHP TestFest page]].//
===== What is TestFest? =====
TestFest is an annual PHP community campaign designed to increase the test coverage of the PHP language. During this four month event, PHP User
====== PHP TestFest 2009 ======
//This page contains out-dated material and is archived here for infor... r recent information, see the [[qa:testfest| main PHP TestFest page]].//
===== How do I join? How do I... get more information? =====
See the [[http://qa.php.net/testfest.php|TestFest]] homepage on the QA team website for details. Alternatively you can join #p
Developer documentation ======
*[[http://wiki.php.net/qa/runtests/documentation/commandline|Command... ======
runtests is a test environment written in PHP. It is used to test PHP itself.
It is not a replacement for unit test frameworks like PHPUnit.
The basic principle of automated tests is v
====== PHPT roundup talk ======
This wikipage contains all extra information for the talk prepared for [[qa:testfest-2009|phptestfest 2009]]. They heavily rely on content writ... me.
[[http://tinyurl.com/c9bqf4]]
===== How is PHP Tested =====
==== What is a PHPT ====
A phpt test is a little script used by the php internal and qu
Script 1 ====
This script runs through all of the phpt tests in the source tree and then compares the f... nction calls in the tests with a complete list of PHP's internal functions. At the end it will tell you if there is a function in PHP that is not mentioned in any test case (I get 415). Thanks to Damien Seguy for this.
<code php>
<?php
// define here your PHP source directory
====== Building a PHP Test Environment in Windows ======
Building a PHP test environment on Windows is a three step process... Package (x86)”.
- Install the latest version of PHP 5.2.
- Install the latest version of PHP 5.3.
We recommend you run tests you've written against the
tting up development environment ======
run-tests.php is a PHP script so all you really need is a fairly standard development environment. This is a brief s... ode this page is not for you - look [[http://wiki.php.net/qa/runtests/howtorun|here]]
==== Installing PHP ====
* Download the PHP 5.4.0 source tar
*
====== run-tests.php command line options and environment variables options ======
===== Short Options... ^ implemented ^
| h | | help | yes | yes |
| p | PHP_TEST_EXECUTABLE | Specifies PHP executable to be tested | yes | yes |
| v | | Writes the PHP command that's passed to proc_open(), and ... | y
====== Running the new version of run-tests.php ======
===== Extract the code =====
Checkout the code from the PHP git repository like this:
<code>
git clone http://git.php.net/repository/phpruntests.git
</code>
Under the phpruntests directory you will find all the source c
name ^Reason for difference ^
|6 tests fail in phpruntests and do not fail in run-tests | | |
| | ext\standard\tests\general_functions\phpinfo.phpt|Occasional fail – can't explain |
| | tests\basic\bug20539.phpt |This warns and skips in the old version, we are
* sudo apt-get install lcov
=== Checkout the PHP53 code and build it ===
* Checkout or download PHP53 into directory of your choice (in my case /home/zoe/BUILDS/php53_dev)
* cd /home/zoe/BUILDS/php53_dev
* ./buildconf
* ./configure --enable-gcov
* make
=== C
====== Building a PHP Test Environment on Mac OS X ======
The following instructions were written for ... rting to build your test environment.
Building a PHP test environment on Mac OS X is a three step proc... you've written against the three main branches of PHP: 5.2, 5.3 and Trunk.
The rest of the instruction... hat Mac OS X needs to configure compile and build PHP are all included in Xcode. Xcode can be installed
name ^Reason for difference ^
|5 tests fail in phpruntests and do not fail in run-tests | | |
| | ext/standard/tests/general_functions/phpinfo.phpt | ? |
| | ext/standard/tests/strings/htmlentities02.phpt | This test fails when mbstring is configd. It f
name ^Reason for difference ^
|4 tests fail in phpruntests and do not fail in run-tests | | |
| | ext/standard/tests/general_functions/phpinfo.phpt | ? |
| | ext/standard/tests/strings/htmlentities02.phpt | This test fails when mbstring is configd. It f
====== Lessons Learned from PHPT Writing ======
I decided to write this mainly because I won’t be writ... hed, mb_ereg returned int(35). (see mb_ereg_basic.phpt).
* base64 encode any multibyte strings that a... Zoe Slattery (thank you!) and can be found in the PHP 5_3 source code in //scripts/dev/generate_phpt.php//. Although it’s in the 5_3 source code, I think I’