1--TEST--
2PDO::ATTR_DRIVER_NAME
3--SKIPIF--
4<?php
5require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
6require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
7MySQLPDOTest::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	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