/** * @covers Zend\Db\TableGateway\TableGateway::update */ public function testUpdate() { $update = $this->getMock('Zend\\Db\\Sql\\Update'); // assert select::from() is called $update->expects($this->once())->method('where')->with($this->equalTo('foo')); $this->table->setSqlUpdate($update); $this->table->update(array('foo' => 'bar'), 'foo'); }