Blame tests/p_php/10-php-test.sh
|
Christoph Galuschka |
63ebd1 |
#!/bin/sh
|
|
Christoph Galuschka |
63ebd1 |
# Author: Athmane Madjoudj <athmanem@gmail.com>
|
|
Christoph Galuschka |
63ebd1 |
# Author: Christoph Galuschka <christoph.galuschka@chello.at>
|
|
Christoph Galuschka |
63ebd1 |
|
|
Christoph Galuschka |
33951f |
t_Log "Running $0 - php test: looking for Zend Engine in phpinfo()."
|
|
|
ecf875 |
t_SkipReleaseGreaterThan 7 'use module-aware tests instead'
|
|
Christoph Galuschka |
63ebd1 |
|
|
Christoph Galuschka |
63ebd1 |
FILE='/var/tmp/php-test.php'
|
|
Christoph Galuschka |
63ebd1 |
|
|
Christoph Galuschka |
63ebd1 |
cat > $FILE <
|
|
Christoph Galuschka |
63ebd1 |
|
|
Christoph Galuschka |
63ebd1 |
phpinfo();
|
|
Christoph Galuschka |
63ebd1 |
?>
|
|
Christoph Galuschka |
63ebd1 |
EOF
|
|
Christoph Galuschka |
63ebd1 |
|
|
Christoph Galuschka |
63ebd1 |
# setting timezone for phpinfo
|
|
Christoph Galuschka |
63ebd1 |
sed -i 's/\;date\.timezone\ \=/date\.timezone = \"Europe\/Berlin\"/' /etc/php.ini
|
|
Christoph Galuschka |
63ebd1 |
|
|
Athmane Madjoudj |
5ccbc7 |
php $FILE | grep -q 'Zend Engine'
|
|
Christoph Galuschka |
63ebd1 |
|
|
Christoph Galuschka |
63ebd1 |
t_CheckExitStatus $?
|
|
Christoph Galuschka |
63ebd1 |
|
|
Christoph Galuschka |
63ebd1 |
#reversing changes
|
|
Christoph Galuschka |
63ebd1 |
/bin/rm $FILE
|
|
Christoph Galuschka |
63ebd1 |
sed -i 's/\date\.timezone\ \=\ \"Europe\/Berlin\"/\;date\.timezone\ \=/' /etc/php.ini
|