mirror of
https://github.com/php/php-src.git
synced 2024-10-18 06:52:34 +00:00
7ab5d01e23
- Updated PDO_OCI to the latest version (from PHP_5_3 branch) # This commit reverts some changes to the tests. Given the very high # failure ratio of the current tests on HEAD I'm not going to fix them # now. Keeping ext/pdo_oci in sync with 5.3 will be much more helpful when # merging. The effort to fix the tests can start when 5.3 is out.
44 lines
975 B
PHP
44 lines
975 B
PHP
--TEST--
|
|
PDO_OCI: Attribute: Client version
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
|
|
require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc');
|
|
PDOTest::skip();
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc');
|
|
|
|
$dbh = PDOTest::factory();
|
|
|
|
echo "ATTR_CLIENT_VERSION: ";
|
|
$cv = $dbh->getAttribute(PDO::ATTR_CLIENT_VERSION);
|
|
var_dump($cv);
|
|
|
|
$s = split("\.", $cv);
|
|
if ($s[0] >= 10 && count($s) > 1 && $s[1] >= 2) {
|
|
if (count($s) != 5) {
|
|
echo "Wrong number of values in array\nVersion was: ";
|
|
var_dump($cv);
|
|
} else {
|
|
echo "Version OK, so far as can be portably checked\n";
|
|
}
|
|
} else {
|
|
if (count($s) != 2) {
|
|
echo "Wrong number of values in array\nVersion was: ";
|
|
var_dump($cv);
|
|
} else {
|
|
echo "Version OK, so far as can be portably checked\n";
|
|
}
|
|
}
|
|
|
|
echo "Done\n";
|
|
|
|
?>
|
|
--EXPECTF--
|
|
ATTR_CLIENT_VERSION: string(%d) "%d.%s"
|
|
Version OK, so far as can be portably checked
|
|
Done
|