1--TEST-- 2PDO_OCI: Attribute: Setting session module 3--EXTENSIONS-- 4pdo 5pdo_oci 6--SKIPIF-- 7<?php 8require(__DIR__.'/../../pdo/tests/pdo_test.inc'); 9PDOTest::skip(); 10?> 11--FILE-- 12<?php 13 14require(__DIR__ . '/../../pdo/tests/pdo_test.inc'); 15 16$query = 'select module from v$session where sid = sys_context(\'USERENV\', \'SID\')'; 17 18$dbh = PDOTest::factory(); 19 20var_dump($dbh->setAttribute(PDO::OCI_ATTR_MODULE, "some module")); 21 22$stmt = $dbh->query($query); 23$row = $stmt->fetch(); 24echo 'MODULE SET: '; 25var_dump($row['module']); 26 27var_dump($dbh->setAttribute(PDO::OCI_ATTR_MODULE, "something else!")); 28 29$stmt = $dbh->query($query); 30$row = $stmt->fetch(); 31echo 'MODULE RESET: '; 32var_dump($row['module']); 33 34var_dump($dbh->setAttribute(PDO::OCI_ATTR_MODULE, null)); 35 36$stmt = $dbh->query($query); 37$row = $stmt->fetch(); 38echo 'MODULE NULLED: '; 39var_dump($row['module']); 40 41echo "Done\n"; 42 43?> 44--EXPECT-- 45bool(true) 46MODULE SET: string(11) "some module" 47bool(true) 48MODULE RESET: string(15) "something else!" 49bool(true) 50MODULE NULLED: NULL 51Done 52