public function CollectionTest::testRemove

File

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

Class

CollectionTest

Namespace

Doctrine\Tests\Common\Collections

Code

public function testRemove() {
  $this->_coll[] = 'one';
  $this->_coll[] = 'two';
  $el = $this->_coll
    ->remove(0);
  $this
    ->assertEquals('one', $el);
  $this
    ->assertEquals($this->_coll
    ->contains('one'), false);
  $this
    ->assertNull($this->_coll
    ->remove(0));
}