You are here

public function CollectionTest::testFirstAndLast in Plug 7

File

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

Class

CollectionTest

Namespace

Doctrine\Tests\Common\Collections

Code

public function testFirstAndLast() {
  $this->collection
    ->add('one');
  $this->collection
    ->add('two');
  $this
    ->assertEquals($this->collection
    ->first(), 'one');
  $this
    ->assertEquals($this->collection
    ->last(), 'two');
}