public function CollectionTest::testExists in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CollectionTest.php \Doctrine\Tests\Common\Collections\CollectionTest::testExists()
File
- vendor/
doctrine/ collections/ tests/ Doctrine/ Tests/ Common/ Collections/ CollectionTest.php, line 41
Class
Namespace
Doctrine\Tests\Common\CollectionsCode
public function testExists() {
$this->collection
->add("one");
$this->collection
->add("two");
$exists = $this->collection
->exists(function ($k, $e) {
return $e == "one";
});
$this
->assertTrue($exists);
$exists = $this->collection
->exists(function ($k, $e) {
return $e == "other";
});
$this
->assertFalse($exists);
}