Esempio n. 1
0
 /**
  * @group 9294
  */
 public function testDestroyWithAutoQuoteIdentifiersEnabledAndDisabled()
 {
     $id = uniqid();
     $config = $this->_saveHandlerTableConfig;
     $configDb = array('options' => array('autoQuoteIdentifiers' => false), 'profiler' => true);
     $this->_setupDb($config['primary'], $configDb);
     $config['db'] = $this->_db;
     $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
     $saveHandler->destroy($id);
     $lastQuery = $this->_db->getProfiler()->getLastQueryProfile()->getQuery();
     $partQueryExpected = "WHERE (id = '{$id}') AND (save_path = '') AND (name = '')";
     $this->assertContains($partQueryExpected, $lastQuery);
     $configDb = array('options' => array('autoQuoteIdentifiers' => true), 'profiler' => true);
     $this->_setupDb($config['primary'], $configDb);
     $config['db'] = $this->_db;
     $saveHandler = new Zend_Session_SaveHandler_DbTable($config);
     $saveHandler->destroy($id);
     $lastQuery = $this->_db->getProfiler()->getLastQueryProfile()->getQuery();
     $partQueryExpected = "WHERE (\"id\" = '{$id}') AND (\"save_path\" = '') AND (\"name\" = '')";
     $this->assertContains($partQueryExpected, $lastQuery);
 }