Annotation of embedaddon/php/ext/pdo_oci/tests/pdo_oci_attr_client.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: PDO_OCI: Attribute: Client version
3: --SKIPIF--
4: <?php
5: if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded');
6: require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc');
7: PDOTest::skip();
8: ?>
9: --FILE--
10: <?php
11:
12: require(dirname(__FILE__) . '/../../pdo/tests/pdo_test.inc');
13:
14: $dbh = PDOTest::factory();
15:
16: echo "ATTR_CLIENT_VERSION: ";
17: $cv = $dbh->getAttribute(PDO::ATTR_CLIENT_VERSION);
18: var_dump($cv);
19:
20: $s = explode(".", $cv);
21: if ($s[0] >= 10 && count($s) > 1 && $s[1] >= 2) {
22: if (count($s) != 5) {
23: echo "Wrong number of values in array\nVersion was: ";
24: var_dump($cv);
25: } else {
26: echo "Version OK, so far as can be portably checked\n";
27: }
28: } else {
29: if (count($s) != 2) {
30: echo "Wrong number of values in array\nVersion was: ";
31: var_dump($cv);
32: } else {
33: echo "Version OK, so far as can be portably checked\n";
34: }
35: }
36:
37: echo "Done\n";
38:
39: ?>
40: --EXPECTF--
41: ATTR_CLIENT_VERSION: string(%d) "%d.%s"
42: Version OK, so far as can be portably checked
43: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>