/** * Tests PFXUtils::beginTransactionSafe(). */ public function testBeginTransactionSafe() { // Our database connection shouldn't be in a transaction yet $this->assertTrue(PFXUtils::beginTransactionSafe(self::$_dbConn)); // And now it is, so it shouldn't begin another one $this->assertFalse(PFXUtils::beginTransactionSafe(self::$_dbConn)); self::$_dbConn->commit(); $this->assertTrue(PFXUtils::beginTransactionSafe(self::$_dbConn)); self::$_dbConn->commit(); }