本文整理汇总了PHP中PHPUnit_Framework_MockObject_Generator::select方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPUnit_Framework_MockObject_Generator::select方法的具体用法?PHP PHPUnit_Framework_MockObject_Generator::select怎么用?PHP PHPUnit_Framework_MockObject_Generator::select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHPUnit_Framework_MockObject_Generator
的用法示例。
在下文中一共展示了PHPUnit_Framework_MockObject_Generator::select方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testFetchAll
/**
* @covers VisioCrudModeler\Model\TableGateway\AbstractTable:fetchAll
*/
public function testFetchAll()
{
$select = $this->mockSql->select();
$this->assertInstanceOf('\\Zend\\Db\\ResultSet\\ResultSet', $this->table->fetchAll());
$this->assertInstanceOf('\\Zend\\Db\\ResultSet\\ResultSet', $this->table->fetchAll($select));
}
示例2: testSelectWithWhereString
/**
* @covers Zend\Db\TableGateway\TableGateway::select
* @covers Zend\Db\TableGateway\TableGateway::selectWith
*/
public function testSelectWithWhereString()
{
$mockSelect = $this->mockSql->select();
$mockSelect->expects($this->any())->method('getRawState')->will($this->returnValue(array('table' => $this->table->getTable())));
// assert select::from() is called
$mockSelect->expects($this->once())->method('where')->with($this->equalTo('foo'));
$this->table->select('foo');
}