You are here

public function CollectionTest::testMatchingSlice in Plug 7

@group DDC-1637

File

lib/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CollectionTest.php, line 241

Class

CollectionTest

Namespace

Doctrine\Tests\Common\Collections

Code

public function testMatchingSlice() {
  $this
    ->fillMatchingFixture();
  $col = $this->collection
    ->matching(new Criteria(null, null, 1, 1));
  $this
    ->assertInstanceOf('Doctrine\\Common\\Collections\\Collection', $col);
  $this
    ->assertNotSame($col, $this->collection);
  $this
    ->assertEquals(1, count($col));
  $this
    ->assertEquals('baz', $col[0]->foo);
}