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