File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / pdo_mysql / tests / pdo_mysql_phpinfo.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:59 2012 UTC (12 years, 6 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

--TEST--
MySQL PDO phpinfo() output
--SKIPIF--
<?php
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
MySQLPDOTest::skip();
$db = MySQLPDOTest::factory();
?>
--FILE--
<?php
	require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
	$db = MySQLPDOTest::factory();

	ob_start();
	phpinfo();
	$tmp = ob_get_contents();
	ob_end_clean();

	/*	PDO Driver for MySQL, client library version => 6.0.3-alpha	*/
	$expected = sprintf('Client API version => %s',
		$db->getAttribute(PDO::ATTR_CLIENT_VERSION));

	if (false === stristr($tmp, $expected)) {
		printf("[001] Cannot find MySQL PDO driver line in phpinfo() output\n");
	}

	print "done!";
?>
--EXPECT--
done!

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>