You are here

public function ArrayCollectionTest::testEmpty in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ArrayCollectionTest.php \Doctrine\Tests\Common\Collections\ArrayCollectionTest::testEmpty()

File

vendor/doctrine/collections/tests/Doctrine/Tests/Common/Collections/ArrayCollectionTest.php, line 219

Class

ArrayCollectionTest
Tests for { @covers \Doctrine\Common\Collections\ArrayCollection

Namespace

Doctrine\Tests\Common\Collections

Code

public function testEmpty() {
  $collection = new ArrayCollection();
  $this
    ->assertTrue($collection
    ->isEmpty(), "Empty collection");
  $collection
    ->add(1);
  $this
    ->assertFalse($collection
    ->isEmpty(), "Not empty collection");
}