public function CollectionTest::testExists in Plug 7
File
- lib/
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);
}