public function CollectionTest::testMatching

@group DDC-1637

File

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

Class

CollectionTest

Namespace

Doctrine\Tests\Common\Collections

Code

public function testMatching() {
  $this
    ->fillMatchingFixture();
  $col = $this->_coll
    ->matching(new Criteria(Criteria::expr()
    ->eq("foo", "bar")));
  $this
    ->assertInstanceOf('Doctrine\\Common\\Collections\\Collection', $col);
  $this
    ->assertNotSame($col, $this->_coll);
  $this
    ->assertEquals(1, count($col));
}