You are here

public function CollectionTest::testMatching in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CollectionTest.php \Doctrine\Tests\Common\Collections\CollectionTest::testMatching()

@group DDC-1637

File

vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CollectionTest.php, line 212

Class

CollectionTest

Namespace

Doctrine\Tests\Common\Collections

Code

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