當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Test_DbStatement::createSelectStatement方法代碼示例

本文整理匯總了PHP中Zend_Test_DbStatement::createSelectStatement方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Test_DbStatement::createSelectStatement方法的具體用法?PHP Zend_Test_DbStatement::createSelectStatement怎麽用?PHP Zend_Test_DbStatement::createSelectStatement使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Test_DbStatement的用法示例。


在下文中一共展示了Zend_Test_DbStatement::createSelectStatement方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testCreateSelectStatementWithRows

 public function testCreateSelectStatementWithRows()
 {
     $rows = array("foo", "bar");
     $stmt = Zend_Test_DbStatement::createSelectStatement($rows);
     $this->assertTrue($stmt instanceof Zend_Test_DbStatement);
     $this->assertEquals($rows, $stmt->fetchAll());
 }
開發者ID:crodriguezn,項目名稱:crossfit-milagro,代碼行數:7,代碼來源:DbStatementTest.php

示例2: testIsInstalled

 public function testIsInstalled()
 {
     $installer = new Installer_Default($this->db);
     $this->assertFalse($installer->isInstalled());
     $this->dbAdapter->appendStatementToStack(Zend_Test_DbStatement::createSelectStatement(array('omeka_options')));
     $this->assertTrue($installer->isInstalled());
     $this->profilerHelper->assertDbQuery("SHOW TABLES LIKE 'omeka_options'");
 }
開發者ID:emhoracek,項目名稱:Omeka,代碼行數:8,代碼來源:DefaultTest.php

示例3: testAppendStatementToStack

 public function testAppendStatementToStack()
 {
     $stmt1 = Zend_Test_DbStatement::createSelectStatement(array());
     $this->_adapter->appendStatementToStack($stmt1);
     $stmt2 = Zend_Test_DbStatement::createSelectStatement(array());
     $this->_adapter->appendStatementToStack($stmt2);
     $this->assertSame($stmt2, $this->_adapter->query("foo"));
     $this->assertSame($stmt1, $this->_adapter->query("foo"));
 }
開發者ID:nbcutech,項目名稱:o3drupal,代碼行數:9,代碼來源:DbAdapterTest.php

示例4: testSetRecordUsingIntegerId

 public function testSetRecordUsingIntegerId()
 {
     $builder = new DummyRecordBuilder($this->db);
     $this->dbAdapter->appendStatementToStack(Zend_Test_DbStatement::createSelectStatement(array(array('id' => self::DUMMY_RECORD_ID, 'description' => 'foobar'))));
     $builder->setRecord(self::DUMMY_RECORD_ID);
     $record = $builder->getRecord();
     $this->assertThat($record, $this->isInstanceOf('DummyRecordBuilderRecord'));
     $this->assertTrue($record->exists());
 }
開發者ID:emhoracek,項目名稱:Omeka,代碼行數:9,代碼來源:BuilderTest.php

示例5: testTotalItems

 public function testTotalItems()
 {
     $collectionId = 1;
     $this->dbAdapter = new Zend_Test_DbAdapter();
     $this->dbAdapter->appendLastInsertIdToStack($collectionId);
     $this->db = new Omeka_Db($this->dbAdapter);
     $this->collection = new Collection($this->db);
     $this->profilerHelper = new Omeka_Test_Helper_DbProfiler($this->db->getAdapter()->getProfiler(), $this);
     $this->dbAdapter->appendStatementToStack(Zend_Test_DbStatement::createSelectStatement(array(array(3))));
     $this->assertEquals(3, $this->collection->totalItems());
 }
開發者ID:emhoracek,項目名稱:Omeka,代碼行數:11,代碼來源:CollectionTest.php


注:本文中的Zend_Test_DbStatement::createSelectStatement方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。