/** * Count the items in the basket * * @return int */ public function count() { return $this->products->count(); }
/** @test */ public function should_get_and_remove_the_first_item() { $person = $this->collection->shift(); $this->assertEquals(4, $this->collection->count()); $this->assertEquals('Homer', $person); }