Beispiel #1
0
 /**
  * Tests current method returns same data on consecutive calls.
  *
  * @covers Zend\Db\Adapter\Driver\Pdo\Result::current
  */
 public function testCurrent()
 {
     $stub = $this->getMock('PDOStatement');
     $stub->expects($this->any())->method('fetch')->will($this->returnCallback(function () {
         return uniqid();
     }));
     $result = new Result();
     $result->initialize($stub, null);
     $this->assertEquals($result->current(), $result->current());
 }