public function setUp() { $this->collection = new Keywords(); foreach ($this->keywords as $keyword) { $object = $this->hydrate(new Keyword(), $keyword); $this->collection->addKeyword($object); } }
/** * {@inheritdoc} */ public function createCollection(array $data = []) { $collection = new Keywords(); if (array_key_exists('keywords', $data)) { $data = $data['keywords']; } foreach ($data as $item) { $collection->addKeyword($this->create($item)); } return $collection; }