diff options
Diffstat (limited to 'ext/oci8/tests/edition_1.phpt')
-rw-r--r-- | ext/oci8/tests/edition_1.phpt | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/oci8/tests/edition_1.phpt b/ext/oci8/tests/edition_1.phpt index 3e55ee902c..19c0a5d3b3 100644 --- a/ext/oci8/tests/edition_1.phpt +++ b/ext/oci8/tests/edition_1.phpt @@ -1,8 +1,8 @@ --TEST-- Basic test for setting Oracle 11gR2 "edition" attribute --SKIPIF-- -<?php -if (!extension_loaded('oci8')) die("skip no oci8 extension"); +<?php +if (!extension_loaded('oci8')) die("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) { die("skip needs to be run as a DBA user"); @@ -11,7 +11,7 @@ if ($test_drcp) { die("skip as Output might vary with DRCP"); } preg_match('/.*Release ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)*/', oci_server_version($c), $matches); -if (!(isset($matches[0]) && +if (!(isset($matches[0]) && (($matches[1] == 11 && $matches[2] >= 2) || ($matches[1] >= 12) ))) { @@ -30,11 +30,11 @@ if (!(isset($matches[0]) && /* In 11.2, there can only be one child edition. So this test will * fail to create the necessary editions if a child edition exists - * already + * already */ $testuser = 'testuser_attr_1'; // Used in conn_attr.inc -$testpassword = 'testuser'; +$testpassword = 'testuser'; require(dirname(__FILE__)."/conn_attr.inc"); @@ -45,18 +45,18 @@ function select_fn($conn) { var_dump($row); } } -/* Create a editon MYEDITION +/* Create a editon MYEDITION create a view view_ed in MYEDITION1. create the same view 'view_ed' with a different definition in MYEDITION. select from both the editions and verify the contents. */ set_edit_attr('MYEDITION'); -$conn = oci_connect($testuser,$testpassword,$dbase); +$conn = oci_connect($testuser,$testpassword,$dbase); if ($conn === false) { $m = oci_error(); die("Error:" . $m['message']); } - + $stmtarray = array( "drop table edit_tab", "create table edit_tab (name varchar2(10),age number,job varchar2(50), salary number)", @@ -73,7 +73,7 @@ select_fn($conn); // Create a different version of view_ed in MYEDITION1. set_edit_attr('MYEDITION1'); -$conn2 = oci_new_connect($testuser,$testpassword,$dbase); +$conn2 = oci_new_connect($testuser,$testpassword,$dbase); $stmt = "create or replace editioning view view_ed as select name,age,job,salary from edit_tab"; $s = oci_parse($conn2, $stmt); oci_execute($s); @@ -83,7 +83,7 @@ get_edit_attr($conn2); select_fn($conn2); // Verify the contents in MYEDITION EDITION. -echo "version of view_ed in MYEDITION \n"; +echo "version of view_ed in MYEDITION\n"; get_edit_attr($conn); select_fn($conn); @@ -135,7 +135,7 @@ array(4) { [3]=> string(%d) "100" } -version of view_ed in MYEDITION +version of view_ed in MYEDITION The value of current EDITION is MYEDITION array(3) { [0]=> |