Annotation of embedaddon/php/ext/pdo_mysql/tests/pdo_mysql_phpinfo.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: MySQL PDO phpinfo() output
3: --SKIPIF--
4: <?php
5: require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
6: require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
7: MySQLPDOTest::skip();
8: $db = MySQLPDOTest::factory();
9: ?>
10: --FILE--
11: <?php
12: require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
13: $db = MySQLPDOTest::factory();
14:
15: ob_start();
16: phpinfo();
17: $tmp = ob_get_contents();
18: ob_end_clean();
19:
20: /* PDO Driver for MySQL, client library version => 6.0.3-alpha */
1.1.1.2 ! misho 21: $reg = 'Client API version.*' . preg_quote($db->getAttribute(PDO::ATTR_CLIENT_VERSION), '/');
1.1 misho 22:
1.1.1.2 ! misho 23: if (!preg_match("/$reg/", $tmp)) {
1.1 misho 24: printf("[001] Cannot find MySQL PDO driver line in phpinfo() output\n");
25: }
26:
27: print "done!";
28: ?>
29: --EXPECT--
30: done!
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>