equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Test |
16 * @package Zend_Test |
17 * @subpackage PHPUnit |
17 * @subpackage PHPUnit |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: Truncate.php 20096 2010-01-06 02:05:09Z bkarwin $ |
20 * @version $Id: Truncate.php 24593 2012-01-05 20:35:02Z matthew $ |
21 */ |
21 */ |
22 |
22 |
23 /** |
23 /** |
24 * @see PHPUnit_Extensions_Database_Operation_IDatabaseOperation |
24 * @see PHPUnit_Extensions_Database_Operation_IDatabaseOperation |
25 */ |
25 */ |
50 * |
50 * |
51 * @uses PHPUnit_Extensions_Database_Operation_IDatabaseOperation |
51 * @uses PHPUnit_Extensions_Database_Operation_IDatabaseOperation |
52 * @category Zend |
52 * @category Zend |
53 * @package Zend_Test |
53 * @package Zend_Test |
54 * @subpackage PHPUnit |
54 * @subpackage PHPUnit |
55 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
55 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
56 * @license http://framework.zend.com/license/new-bsd New BSD License |
56 * @license http://framework.zend.com/license/new-bsd New BSD License |
57 */ |
57 */ |
58 class Zend_Test_PHPUnit_Db_Operation_Truncate implements PHPUnit_Extensions_Database_Operation_IDatabaseOperation |
58 class Zend_Test_PHPUnit_Db_Operation_Truncate implements PHPUnit_Extensions_Database_Operation_IDatabaseOperation |
59 { |
59 { |
60 /** |
60 /** |
87 * @param string $tableName |
87 * @param string $tableName |
88 * @return void |
88 * @return void |
89 */ |
89 */ |
90 protected function _truncate(Zend_Db_Adapter_Abstract $db, $tableName) |
90 protected function _truncate(Zend_Db_Adapter_Abstract $db, $tableName) |
91 { |
91 { |
92 $tableName = $db->quoteIdentifier($tableName); |
92 $tableName = $db->quoteIdentifier($tableName, true); |
93 if($db instanceof Zend_Db_Adapter_Pdo_Sqlite) { |
93 if($db instanceof Zend_Db_Adapter_Pdo_Sqlite) { |
94 $db->query('DELETE FROM '.$tableName); |
94 $db->query('DELETE FROM '.$tableName); |
95 } else if($db instanceof Zend_Db_Adapter_Db2) { |
95 } else if($db instanceof Zend_Db_Adapter_Db2) { |
96 /*if(strstr(PHP_OS, "WIN")) { |
96 /*if(strstr(PHP_OS, "WIN")) { |
97 $file = tempnam(sys_get_temp_dir(), "zendtestdbibm_"); |
97 $file = tempnam(sys_get_temp_dir(), "zendtestdbibm_"); |