public function CollectionTest::testForAll

File

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

Class

CollectionTest

Namespace

Doctrine\Tests\Common\Collections

Code

public function testForAll() {
  $this->_coll[] = 'one';
  $this->_coll[] = 'two';
  $this
    ->assertEquals($this->_coll
    ->forAll(function ($k, $e) {
    return is_string($e);
  }), true);
  $this
    ->assertEquals($this->_coll
    ->forAll(function ($k, $e) {
    return is_array($e);
  }), false);
}