/** * @return array */ public function toArray() { return $this->brands->toArray(); }
/** * @expectedException \InvalidArgumentException * @expectedExceptionMessage Value is not an instance of Brand */ public function testAddInvalidBrandShouldThrowInvalidArgumentException() { $collection = new BrandCollection(); $collection->add(1); }