示例#1
0
 /**
  * Rewind the adapter pool.
  * @return \Brickoo\Component\Storage\StorageProxy
  */
 private function rewindAdapterPool()
 {
     $this->adapterPoolIterator->rewind();
     return $this;
 }
 /**
  * @covers Brickoo\Component\Storage\Adapter\AdapterPoolIterator::current
  * @covers Brickoo\Component\Storage\Adapter\AdapterPoolIterator::isEmpty
  * @covers Brickoo\Component\Storage\Adapter\Exception\PoolIsEmptyException
  * @expectedException \Brickoo\Component\Storage\Adapter\Exception\PoolIsEmptyException
  */
 public function testIteratorThrowsExceptionIfCurrentValueIsNotAvailable()
 {
     $adapter = $this->getAdapterStub();
     $adapterPoolIterator = new AdapterPoolIterator(["adapter" => $adapter]);
     $adapterPoolIterator->rewind();
     $this->assertSame($adapter, $adapterPoolIterator->current());
     $adapterPoolIterator->next();
     $adapterPoolIterator->current();
 }