You are here

public function CollectionTest::testIssetAndUnset in Plug 7

File

lib/doctrine/collections/tests/Doctrine/Tests/Common/Collections/CollectionTest.php, line 21

Class

CollectionTest

Namespace

Doctrine\Tests\Common\Collections

Code

public function testIssetAndUnset() {
  $this
    ->assertFalse(isset($this->collection[0]));
  $this->collection
    ->add('testing');
  $this
    ->assertTrue(isset($this->collection[0]));
  unset($this->collection[0]);
  $this
    ->assertFalse(isset($this->collection[0]));
}