Remove references to and noisly deprecated CRM_Core_DAO::createTempTableName
[civicrm-core.git] / tests / phpunit / CRM / Core / DAOTest.php
index 32e8e38babb3c084a07ff4b7e4385702e4d5b629..97ab38026bf806e8407a326e655268e694ceaaf1 100644 (file)
@@ -296,21 +296,14 @@ class CRM_Core_DAOTest extends CiviUnitTestCase {
     $this->assertEquals(1, CRM_Core_DAO::isDBMyISAM());
     CRM_Core_DAO::executeQuery('DROP TABLE civicrm_my_isam');
 
-    // A temp table should not raise flag (static naming).
-    $tempName = CRM_Core_DAO::createTempTableName('civicrm', FALSE);
-    $this->assertEquals(0, CRM_Core_DAO::isDBMyISAM());
-    CRM_Core_DAO::executeQuery("CREATE TABLE $tempName (`id` int(10) unsigned NOT NULL) ENGINE = MyISAM");
-    // Ignore temp tables
-    $this->assertEquals(0, CRM_Core_DAO::isDBMyISAM());
-    CRM_Core_DAO::executeQuery("DROP TABLE $tempName");
-
+    // A temp table should not raise flag.
+    $tempTableName = CRM_Utils_SQL_TempTable::build()->setCategory('myisam')->getName();
     // A temp table should not raise flag (randomized naming).
-    $tempName = CRM_Core_DAO::createTempTableName('civicrm', TRUE);
     $this->assertEquals(0, CRM_Core_DAO::isDBMyISAM());
-    CRM_Core_DAO::executeQuery("CREATE TABLE $tempName (`id` int(10) unsigned NOT NULL) ENGINE = MyISAM");
+    CRM_Core_DAO::executeQuery("CREATE TABLE $tempTableName (`id` int(10) unsigned NOT NULL) ENGINE = MyISAM");
     // Ignore temp tables
     $this->assertEquals(0, CRM_Core_DAO::isDBMyISAM());
-    CRM_Core_DAO::executeQuery("DROP TABLE $tempName");
+    CRM_Core_DAO::executeQuery("DROP TABLE $tempTableName");
   }
 
   /**