1--TEST-- 2PDO_OCI: Attribute: Setting session action 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 action from v$session where sid = sys_context(\'USERENV\', \'SID\')'; 17 18$dbh = PDOTest::factory(); 19 20$stmt = $dbh->query($query); 21$row = $stmt->fetch(); 22echo 'ACTION NOT SET: '; 23var_dump($row['action']); 24 25var_dump($dbh->setAttribute(PDO::OCI_ATTR_ACTION, "some action")); 26 27$stmt = $dbh->query($query); 28$row = $stmt->fetch(); 29echo 'ACTION SET: '; 30var_dump($row['action']); 31 32var_dump($dbh->setAttribute(PDO::OCI_ATTR_ACTION, "something else!")); 33 34$stmt = $dbh->query($query); 35$row = $stmt->fetch(); 36echo 'ACTION RESET: '; 37var_dump($row['action']); 38 39var_dump($dbh->setAttribute(PDO::OCI_ATTR_ACTION, null)); 40 41$stmt = $dbh->query($query); 42$row = $stmt->fetch(); 43echo 'ACTION NULLED: '; 44var_dump($row['action']); 45 46echo "Done\n"; 47 48?> 49--EXPECT-- 50ACTION NOT SET: NULL 51bool(true) 52ACTION SET: string(11) "some action" 53bool(true) 54ACTION RESET: string(15) "something else!" 55bool(true) 56ACTION NULLED: NULL 57Done 58