system/Database/BaseConnection.php
public function transBegin(bool $test_mode = false): bool
	{
		if (! $this->transEnabled)
		{
			return false;
		}
		// When transactions are nested we only begin/commit/rollback the outermost ones
		elseif ($this->transDepth > 0)
		{
			$this->transDepth ++;
			return true;
		}

		if (empty($this->connID))
		{
			$this->initialize();
		}

		// Reset the transaction failure flag.
		// If the $test_mode flag is set to TRUE transactions will be rolled back
		// even if the queries produce a successful result.
		$this->transFailure = ($test_mode === true);

		if ($this->_transBegin())
		{
			$this->transDepth ++;
			return true;
		}

		return false;
	}
public function transBegin(bool $test_mode = false): bool
	{
		if (! $this->transEnabled)
		{
			return false;
		}
		// When transactions are nested we only begin/commit/rollback the outermost ones
		elseif ($this->transDepth > 0)
		{
			$this->transDepth ++;
			return true;
		}

		if (empty($this->connID))
		{
			$this->initialize();
		}

		// Reset the transaction failure flag.
		// If the $test_mode flag is set to TRUE transactions will be rolled back
		// even if the queries produce a successful result.
		$this->transFailure = ($test_mode === true);

		if ($this->_transBegin())
		{
			$this->transDepth ++;
			return true;
		}

		return false;
	}
Begin Transaction

@param  boolean $test_mode
@return boolean