当前位置: 首页>>代码示例>>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;未经允许,请勿转载。