diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2005-06-22 13:41:43 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2005-06-22 13:41:43 +0000 |
| commit | 46b276ee4bf798bb0cf6980798b0752f8c0bdd01 (patch) | |
| tree | e8cc1b393e58131d30e81a5f42b5186b85f4442a | |
| parent | 8566f52297478e2617f8ebfb516123335d047e17 (diff) | |
| download | php-git-46b276ee4bf798bb0cf6980798b0752f8c0bdd01.tar.gz | |
Skip MySQLi tests if connection could not be established and not using
embeded db.
| -rw-r--r-- | ext/mysqli/tests/skipif.inc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/mysqli/tests/skipif.inc b/ext/mysqli/tests/skipif.inc index 5562aab84b..f471b5e126 100644 --- a/ext/mysqli/tests/skipif.inc +++ b/ext/mysqli/tests/skipif.inc @@ -2,4 +2,9 @@ if (!extension_loaded('mysqli')){ die('skip mysqli extension not available'); } +include "connect.inc"; +$driver = new mysqli_driver(); +if (!$driver->embedded && !@mysqli_connect($host, $user, $passwd, "", 3306)) { + die('skip could not connect to MySQL'); +} ?> |
