1--TEST--
2PDO::ATTR_DRIVER_NAME
3--EXTENSIONS--
4pdo_mysql
5--SKIPIF--
6<?php
7require_once __DIR__ . '/inc/mysql_pdo_test.inc';
8MySQLPDOTest::skip();
9?>
10--FILE--
11<?php
12    require_once __DIR__ . '/inc/mysql_pdo_test.inc';
13    $db = MySQLPDOTest::factory();
14
15    assert(('' == $db->errorCode()) || ('00000' == $db->errorCode()));
16
17    $name = $db->getAttribute(PDO::ATTR_DRIVER_NAME);
18    var_dump($name);
19
20    if (false !== $db->setAttribute(PDO::ATTR_DRIVER_NAME, 'mydriver'))
21        printf("[001] Wonderful, I can create new PDO drivers!\n");
22
23    $new_name = $db->getAttribute(PDO::ATTR_DRIVER_NAME);
24    if ($name != $new_name)
25        printf("[002] Did we change it from '%s' to '%s'?\n", $name, $new_name);
26
27    print "done!";
28?>
29--EXPECT--
30string(5) "mysql"
31done!
32