+++ /dev/null
-Many of the tests in this directory require a mail server to be running, if there is no mail server the test will skip and warn, see skipif.inc for details.
-
-To make the tests run parameters in the skipif.inc and imap_include.inc file will need to be changed to match the local mailserver configuration.
-
-
-The tests have been checked using dovecot (on Linux 32 and 64 bit systems) and hMailServer on Windows. The tests are intended to be mailserver agnostic.
-
-The tests can be run without modification with a fairly minimal dovecot installation. For information, the dovecot.conf file used in running the tests is given below (after -----). The dovecot password file (dovecotpass) requires a password for one user, webmaster@something.com. It's also necessary to set up one additional user ID (vmail) to own the mail directory.
-
---------------------------------------------------
-protocols = imap imaps
-
-listen = *
-
-ssl_disable = yes
-
-disable_plaintext_auth=yes
-
-## Mailbox locations and namespaces
-
-mail_location = maildir:/home/vmail/mail/%d/%n/Maildir
-
-auth_verbose = yes
-
-auth_debug = yes
-
-auth default {
-
- mechanisms = login
-
- passdb passwd-file {
- args = /etc/dovecot/dovecotpass
- }
-
- userdb static {
- args = uid=11459 gid=1002 home=/home/vmail/dovecot/mail/%d/%n
- }
-
- user = root
-}
--- /dev/null
+# The imap extension tests
+
+Many of the tests in this directory require a mail server to be running, if
+there is no mail server the test will skip and warn, see skipif.inc for details.
+
+To make the tests run parameters in the `skipif.inc` and `imap_include.inc`
+files will need to be changed to match the local mailserver configuration.
+
+The tests have been checked using dovecot (on Linux 32 and 64 bit systems) and
+hMailServer on Windows. The tests are intended to be mailserver agnostic.
+
+The tests can be run without modification with a fairly minimal dovecot
+installation. For information, the dovecot.conf file used in running the tests
+is given below. The dovecot password file (dovecotpass) requires a password for
+one user, `webmaster@something.com`. It's also necessary to set up one
+additional user ID (vmail) to own the mail directory.
+
+```txt
+protocols = imap imaps
+
+listen = *
+
+ssl_disable = yes
+
+disable_plaintext_auth=yes
+
+## Mailbox locations and namespaces
+
+mail_location = maildir:/home/vmail/mail/%d/%n/Maildir
+
+auth_verbose = yes
+
+auth_debug = yes
+
+auth default {
+ mechanisms = login
+
+ passdb passwd-file {
+ args = /etc/dovecot/dovecotpass
+ }
+
+ userdb static {
+ args = uid=11459 gid=1002 home=/home/vmail/dovecot/mail/%d/%n
+ }
+
+ user = root
+}
+```
*
* Special handling for 'udate', which will vary run-to-run; assumes an IMAP
* server with its clock synced to the current system, which is consistent with
- * setup instructions in ext/imap/tests/README
+ * setup instructions in ext/imap/tests/README.md
*
* @param array resp element from the return value of imap_fetch_overview()
*/
+# The ldap extension tests
+
To ease testing LDAP-Setups we've created a vagrant-setup.
-Prerequisits:
-=============
+## Prerequisites
-You will need vagrant on your box. Get it from https://www.vagrantup.com
+You will need [vagrant](https://www.vagrantup.com) on your box.
-Usage:
-======
+## Usage
To use it follow these steps:
-* Create a Vagrant-file with the following content.
+* Create a `Vagrantfile` with the following content.
* Go to that directory and run "vagrant up"
-```
+```Vagrantfile
$setup = <<<SETUP
apt-get update
end
```
-Now you will have a virtual machine up and running on IP-Address 192.168.10.33 listening on port 369 for incomming LDAP-connections. The machine is already configured to execute the LDAP-Tests
+Now you will have a virtual machine up and running on IP-Address `192.168.10.33`
+listening on port 369 for incomming LDAP-connections. The machine is already
+configured to execute the LDAP-Tests.
-The next step is to go into the PHP-Source-directory. Configure and make the source as appropriate.
+The next step is to go into the PHP-Source-directory. Configure and make the
+source as appropriate.
Before running the LDAP-Tests you need to set some environment-variables:
+```bash
export LDAP_TEST_PASSWD="password"
export LDAP_TEST_BASE="ou=extldap,dc=nodomain"
export LDAP_TEST_USER="dc=admin,dc=nodomain"
export LDAP_TEST_HOST=192.168.33.10
+```
-Now you can run the test-suite by calling "make test". To test only the LDAP-Tests, run "make test TESTS=ext/ldap"
+Now you can run the test-suite by calling `make test`. To test only the
+LDAP-Tests, run `make test TESTS=ext/ldap`.
CAVEAT: The current setup does not (yet) test secure connections.
+## Old README
-========
-OLD README
+Most tests here rely on the availability of an LDAP server configured with TLS.
-Most tests here relies on the availability of an LDAP server configured with TLS.
+### Client/Server configuration
-Client/Server configuration:
-===========================================================
OpenLDAP 2.4.31 has been used with the configuration below.
Notes:
-1. A self signed certificate can be generated using:
- $ openssl req -newkey rsa:1024 -x509 -nodes -out server.pem -keyout server.pem -days 3650
- It is used for testing ldap_start_tls(), which also requires "TLS_REQCERT never" in client configuration
-2. An empty LDAP structure is required for the tests to be PASSed (except for base and admin)
-If you use a debian based distribution, prefer the use of dpkg-reconfigure.
+1. A self signed certificate can be generated using:
+
+ ```bash
+ openssl req -newkey rsa:1024 -x509 -nodes -out server.pem -keyout server.pem -days 3650
+ ```
+
+ It is used for testing ldap_start_tls(), which also requires
+ `TLS_REQCERT never` in client configuration.
+
+2. An empty LDAP structure is required for the tests to be PASSed (except for
+ base and admin)
+
+If you use a debian based distribution, prefer the use of `dpkg-reconfigure`.
Otherwise you may alter these configuration files:
- (/etc/openldap/)slapd.conf:
------------------------------------------------------------
+#### (/etc/openldap/)slapd.conf
+
+```txt
TLSCACertificateFile /etc/openldap/ssl/server.pem
TLSCertificateFile /etc/openldap/ssl/server.pem
TLSCertificateKeyFile /etc/openldap/ssl/server.pem
index objectClass eq
authz-regexp
- uid=Manager,cn=digest-md5,cn=auth
- cn=Manager,dc=my-domain,dc=com
+ uid=Manager,cn=digest-md5,cn=auth
+ cn=Manager,dc=my-domain,dc=com
+```
+#### (/etc/openldap/)ldap.conf
-(/etc/openldap/)ldap.conf:
------------------------------------------------------------
+```txt
TLS_REQCERT never
+```
+
+#### Tests configuration
-Tests configuration:
-===========================================================
The following environment variables may be defined:
+
+```txt
LDAP_TEST_HOST (default: localhost) Host to connect to
LDAP_TEST_PORT (default: 389) Port to connect to
LDAP_TEST_BASE (default: dc=my-domain,dc=com) Base to use. May be the ldap root or a subtree. (ldap_search_variation6 will fail if a subtree is used)
LDAP_TEST_PASSWD (default: secret) Password used for plain and SASL binding
LDAP_TEST_OPT_PROTOCOL_VERSION (default: 3) Version of LDAP protocol to use
LDAP_TEST_SKIP_BIND_FAILURE (default: true) Whether to fail the test or not in case binding fails
+```
+
+## Credits
-Credits:
-===========================================================
-Davide Mendolia <idaf1er@gmail.com>
-Patrick Allaert <patrick.allaert@gmail.com>
-Côme Bernigaud <mcmic@php.net>
+* Davide Mendolia (idaf1er@gmail.com)
+* Patrick Allaert (patrick.allaert@gmail.com)
+* Côme Bernigaud (mcmic@php.net)
+++ /dev/null
-You must set the following environment variables to run the tests:
-
- PDO_MYSQL_TEST_DSN - DSN
- For example: mysql:dbname=test;host=localhost;port=3306
-
- PDO_MYSQL_TEST_HOST - database host
- PDO_MYSQL_TEST_DB - database (schema) name
- PDO_MYSQL_TEST_SOCKET - database server socket
- PDO_MYSQL_TEST_ENGINE - storage engine to use
- PDO_MYSQL_TEST_USER - database user
- PDO_MYSQL_TEST_PASS - database user password
- PDO_MYSQL_TEST_CHARSET - database charset
-
- NOTE: if any of PDO_MYSQL_TEST_[HOST|DB|SOCKET|ENGINE|CHARSET] is
- part of PDO_MYSQL_TEST_DSN, the values must match. That is, for example,
- for PDO_MYSQL_TEST_DSN = mysql:dbname=test you MUST set PDO_MYSQL_TEST_DB=test.
--- /dev/null
+# The pdo_mysql extension tests
+
+You must set the following environment variables to run the tests:
+
+```bash
+# DSN; For example: mysql:dbname=test;host=localhost;port=3306
+PDO_MYSQL_TEST_DSN
+
+# Database host
+PDO_MYSQL_TEST_HOST
+
+# Database (schema) name
+PDO_MYSQL_TEST_DB
+
+# Database server socket
+PDO_MYSQL_TEST_SOCKET
+
+# Storage engine to use
+PDO_MYSQL_TEST_ENGINE
+
+# Database user
+PDO_MYSQL_TEST_USER
+
+# Database user password
+PDO_MYSQL_TEST_PASS
+
+# Database charset
+PDO_MYSQL_TEST_CHARSET
+```
+
+NOTE: if any of `PDO_MYSQL_TEST_[HOST|DB|SOCKET|ENGINE|CHARSET]` is part of
+`PDO_MYSQL_TEST_DSN`, the values must match. That is, for example, for
+`PDO_MYSQL_TEST_DSN = mysql:dbname=test` you MUST set `PDO_MYSQL_TEST_DB=test`.
+++ /dev/null
-Test scripts assumes:
- - PostgreSQL server is installed locally
- - there is a PostgreSQL account for the users running the test scripts
- - there is database named "test"
-
-For instance, if your login name is 'testuser', you should have PostgreSQL
-user account named 'testuser' and grant that user access to the database
-'test'.
-
-If you have account and database, type "createdb test" from command prompt
-to create the database to execute the test scripts. By executing the above
-command as the same user running the tests you ensure that the user is
-granted access to the database.
-
-If you find problems in PostgreSQL module, please mail to
-intenals@lists.php.net, helly@php.net or yohgaki@php.net.
--- /dev/null
+# The pgsql extension tests
+
+Test scripts assumes:
+
+* PostgreSQL server is installed locally
+* There is a PostgreSQL account for the users running the test scripts
+* There is database named `test`
+
+For instance, if your login name is `testuser`, you should have PostgreSQL user
+account named `testuser` and grant that user access to the database `test`.
+
+If you have account and database, type `createdb test` from command prompt to
+create the database to execute the test scripts. By executing the above command
+as the same user running the tests you ensure that the user is granted access to
+the database.
+
+If you find problems in PostgreSQL extension, please report a
+[bug](https://bugs.php.net).
+++ /dev/null
-SNMP Tests
-----------
-
-To enable these tests, you must have :
-- PHP compiled with SNMP (--with-snmp)
-- an SNMP server running.
-
-
-** How to test **
-You need to give credentials with environment vars if default ones are not
-sutable (see snmp_include.inc for more info):
-SNMP_HOSTNAME : IPv4 of remote SNMP agent
-SNMP_HOSTNAME : IPv6 or remote SNMP agent
-SNMP_PORT : SNMP port for queries
-SNMP_COMMUNITY : community name
-SNMP_COMMUNITY_WRITE : community used for write tests (snmpset()).
-SNMP_MIBDIR : Directory containing MIBS
-
-To run test suite you may use this command (presuming that you pwd is where
-this README file is located):
-> make -C ../../.. test TESTS="`cd ../../..; /bin/ls -1 ext/snmp/tests/*.phpt | xargs echo`"
-Running run-tests.php directly will clear your environment and therefore
-tests will fail if your SNMP configuration does not fit into default values
-specified in snmp_include.inc.
-
-** Configuring the SNMPD server **
-
-On Linux/FreeBSD
---------
-
-- Install package net-snmpd (name may differ based on your distribution).
-- Replace config file (by default this is /etc/snmp/snmpd.conf on Linux and
- /usr/local/etc/snmp/snmpd.conf on FreeBSD) with snmpd.conf supplied.
-
-Before launching daemon make sure that there is no file /var/net-snmp/snmpd.conf
-Delete it if exists. Ingoring to to so will fail SNMPv3 tests.
-
-- Place ext/snmp/tests/bigtest near snmpd.conf, tune path to it in snmpd.conf
-
-- Launch snmpd (service snmpd start or /etc/init.d/snmpd start).
- Alternatively you can start snmpd daemon using following command line:
- sudo snmpd -C -c ./snmpd.conf -f -Le
-
-
-On Windows
-----------
-
-[to be completed]
--- /dev/null
+# The snmp extension tests
+
+To enable these tests, you must have:
+
+* PHP compiled with SNMP `--with-snmp`
+* An SNMP server running.
+
+## How to test
+
+You need to give credentials with environment vars if default ones are not
+suitable (see `snmp_include.inc` for more info):
+
+```txt
+SNMP_HOSTNAME : IPv4 of remote SNMP agent
+SNMP_HOSTNAME : IPv6 or remote SNMP agent
+SNMP_PORT : SNMP port for queries
+SNMP_COMMUNITY : community name
+SNMP_COMMUNITY_WRITE : community used for write tests (snmpset()).
+SNMP_MIBDIR : Directory containing MIBS
+```
+
+To run test suite you may use this command (presuming that you pwd is where this
+README file is located):
+
+```bash
+make -C ../../.. test TESTS="`cd ../../..; /bin/ls -1 ext/snmp/tests/*.phpt | xargs echo`"
+```
+
+Running `run-tests.php` directly will clear your environment and therefore tests
+will fail if your SNMP configuration does not fit into default values specified
+in `snmp_include.inc`.
+
+## Configuring the SNMPD server
+
+### On Linux/FreeBSD
+
+* Install package `net-snmpd` (name may differ based on your distribution).
+* Replace config file (by default this is `/etc/snmp/snmpd.conf` on Linux and
+ `/usr/local/etc/snmp/snmpd.conf` on FreeBSD) with `snmpd.conf` supplied.
+
+Before launching daemon make sure that there is no file
+`/var/net-snmp/snmpd.conf`. Delete it if exists. Ingoring to to so will fail
+SNMPv3 tests.
+
+* Place `ext/snmp/tests/bigtest` near `snmpd.conf`, tune path to it in
+ `snmpd.conf`.
+* Launch snmpd (service snmpd start or /etc/init.d/snmpd start). Alternatively
+ you can start snmpd daemon using following command line:
+
+ ```bash
+ sudo snmpd -C -c ./snmpd.conf -f -Le
+ ```