Permalink
Browse files

Renamed variable name from nested transaction

  • Loading branch information...
1 parent 37537fa commit 333ea298052ab50b4ac03a338119583afa5e1184 @jrbasso jrbasso committed Apr 27, 2012
@@ -682,7 +682,7 @@ public function getSchemaName() {
* @return boolean
*/
public function nestedTransactionSupported() {
- return $this->nestedTransaction && version_compare($this->getVersion(), '4.1', '>=');
+ return $this->useNestedTransactions && version_compare($this->getVersion(), '4.1', '>=');
}
}
@@ -901,7 +901,7 @@ public function getSchemaName() {
* @return boolean
*/
public function nestedTransactionSupported() {
- return $this->nestedTransaction && version_compare($this->getVersion(), '8.0', '>=');
+ return $this->useNestedTransactions && version_compare($this->getVersion(), '8.0', '>=');
}
}
@@ -565,7 +565,7 @@ public function getSchemaName() {
* @return boolean
*/
public function nestedTransactionSupported() {
- return $this->nestedTransaction && version_compare($this->getVersion(), '3.6.8', '>=');
+ return $this->useNestedTransactions && version_compare($this->getVersion(), '3.6.8', '>=');
}
}
@@ -76,7 +76,7 @@ class DboSource extends DataSource {
*
* @var boolean
*/
- public $nestedTransaction = false;
+ public $useNestedTransactions = false;
/**
* Print full query debug info?
@@ -3586,10 +3586,10 @@ public function testTruncateStatements() {
* @return void
*/
public function testNestedTransaction() {
- $nested = $this->Dbo->nestedTransaction;
- $this->Dbo->nestedTransaction = true;
+ $nested = $this->Dbo->useNestedTransactions;
+ $this->Dbo->useNestedTransactions = true;
if ($this->Dbo->nestedTransactionSupported() === false) {
- $this->Dbo->nestedTransaction = $nested;
+ $this->Dbo->useNestedTransactions = $nested;
$this->skipIf(true, 'The MySQL server do not support nested transaction');
}
@@ -3617,7 +3617,7 @@ public function testNestedTransaction() {
$this->assertTrue($this->Dbo->rollback());
$this->assertNotEmpty($model->read(null, 1));
- $this->Dbo->nestedTransaction = $nested;
+ $this->Dbo->useNestedTransactions = $nested;
}
}
@@ -54,7 +54,7 @@ public function setConnection($conn) {
}
public function nestedTransactionSupported() {
- return $this->nestedTransaction && $this->nestedSupport;
+ return $this->useNestedTransactions && $this->nestedSupport;
}
}
@@ -849,7 +849,7 @@ public function testTransactionNested() {
$conn = $this->getMock('MockPDO');
$db = new DboTestSource();
$db->setConnection($conn);
- $db->nestedTransaction = true;
+ $db->useNestedTransactions = true;
$db->nestedSupport = true;
$conn->expects($this->at(0))->method('beginTransaction')->will($this->returnValue(true));
@@ -871,7 +871,7 @@ public function testTransactionNestedWithoutSupport() {
$conn = $this->getMock('MockPDO');
$db = new DboTestSource();
$db->setConnection($conn);
- $db->nestedTransaction = true;
+ $db->useNestedTransactions = true;
$db->nestedSupport = false;
$conn->expects($this->once())->method('beginTransaction')->will($this->returnValue(true));
@@ -890,7 +890,7 @@ public function testTransactionNestedDisabled() {
$conn = $this->getMock('MockPDO');
$db = new DboTestSource();
$db->setConnection($conn);
- $db->nestedTransaction = false;
+ $db->useNestedTransactions = false;
$db->nestedSupport = true;
$conn->expects($this->once())->method('beginTransaction')->will($this->returnValue(true));
@@ -193,8 +193,8 @@ public function load(CakeTestCase $test) {
return;
}
- $nested = $test->db->nestedTransaction;
- $test->db->nestedTransaction = false;
+ $nested = $test->db->useNestedTransactions;
+ $test->db->useNestedTransactions = false;
$test->db->begin();
foreach ($fixtures as $f) {
if (!empty($this->_loaded[$f])) {
@@ -205,7 +205,7 @@ public function load(CakeTestCase $test) {
}
}
$test->db->commit();
- $test->db->nestedTransaction = $nested;
+ $test->db->useNestedTransactions = $nested;
}
/**
@@ -241,10 +241,10 @@ public function insert($db) {
$fields = array_keys($record);
$values[] = array_values(array_merge($default, $record));
}
- $nested = $db->nestedTransaction;
- $db->nestedTransaction = false;
+ $nested = $db->useNestedTransactions;
+ $db->useNestedTransactions = false;
$result = $db->insertMulti($this->table, $fields, $values);
- $db->nestedTransaction = $nested;
+ $db->useNestedTransactions = $nested;
return $result;
}
return true;

0 comments on commit 333ea29

Please sign in to comment.