public function CollectionTest::testMatchingSlice

@group DDC-1637

File

drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Collections/CollectionTest.php, line 240

Class

CollectionTest

Namespace

Doctrine\Tests\Common\Collections

Code

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