You are here

public function ArrayCollectionTest::testCurrent in Plug 7

@dataProvider provideDifferentElements

File

lib/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ArrayCollectionTest.php, line 99

Class

ArrayCollectionTest
Tests for { @covers \Doctrine\Common\Collections\ArrayCollection

Namespace

Doctrine\Tests\Common\Collections

Code

public function testCurrent($elements) {
  $collection = new ArrayCollection($elements);
  $this
    ->assertSame(current($elements), $collection
    ->current());
  next($elements);
  $collection
    ->next();
  $this
    ->assertSame(current($elements), $collection
    ->current());
}