当前位置: 首页>>代码示例>>PHP>>正文


PHP PlatformInterface::expects方法代码示例

本文整理汇总了PHP中Zend\Db\Adapter\Platform\PlatformInterface::expects方法的典型用法代码示例。如果您正苦于以下问题:PHP PlatformInterface::expects方法的具体用法?PHP PlatformInterface::expects怎么用?PHP PlatformInterface::expects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend\Db\Adapter\Platform\PlatformInterface的用法示例。


在下文中一共展示了PlatformInterface::expects方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUpMockedAdapter

 /**
  *
  */
 public function setUpMockedAdapter()
 {
     $this->mockedDbAdapterDriver = $this->getMock('Zend\\Db\\Adapter\\Driver\\DriverInterface');
     $this->mockedDbAdapterPlatform = $this->getMock('\\Zend\\Db\\Adapter\\Platform\\PlatformInterface', array());
     $this->mockedDbAdapterStatement = $this->getMock('\\Zend\\Db\\Adapter\\Driver\\StatementInterface', array());
     $this->mockedDbAdapterPlatform->expects($this->any())->method('getName')->will($this->returnValue('null'));
     $this->mockedDbAdapter = $this->getMockBuilder('\\Zend\\Db\\Adapter\\Adapter')->setConstructorArgs(array($this->mockedDbAdapterDriver, $this->mockedDbAdapterPlatform))->getMock(array('getPlatform'));
     $this->mockedDbAdapter->expects($this->any())->method('getPlatform')->will($this->returnValue($this->mockedDbAdapterPlatform));
     $this->mockedDbSql = $this->getMockBuilder('\\Zend\\Db\\Sql\\Sql')->setConstructorArgs(array($this->mockedDbAdapter))->setMethods(array('prepareStatementForSqlObject'))->getMock();
     $this->mockedDbSql->expects($this->any())->method('prepareStatementForSqlObject')->will($this->returnValue($this->mockedDbAdapterStatement));
     $this->mockedDbSqlPlatform = $this->getMockBuilder('\\Zend\\Db\\Sql\\Platform\\Platform')->setConstructorArgs(array($this->mockedDbAdapter))->getMock();
 }
开发者ID:projectsmahendra,项目名称:blogger,代码行数:15,代码来源:UserTest.php


注:本文中的Zend\Db\Adapter\Platform\PlatformInterface::expects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。