1--TEST--
2PDO::ATTR_DRIVER_NAME
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    assert(('' == $db->errorCode()) || ('00000' == $db->errorCode()));
17
18    $name = $db->getAttribute(PDO::ATTR_DRIVER_NAME);
19    var_dump($name);
20
21    if (false !== $db->setAttribute(PDO::ATTR_DRIVER_NAME, 'mydriver'))
22        printf("[001] Wonderful, I can create new PDO drivers!\n");
23
24    $new_name = $db->getAttribute(PDO::ATTR_DRIVER_NAME);
25    if ($name != $new_name)
26        printf("[002] Did we change it from '%s' to '%s'?\n", $name, $new_name);
27
28    print "done!";
29?>
30--EXPECT--
31string(5) "mysql"
32done!
33