/** * @test */ public function tagsCanBePersisted() { $tag = new Tag('foobar'); $this->tagRepository->add($tag); $this->persistenceManager->persistAll(); $this->persistenceManager->clearState(); $this->assertCount(1, $this->tagRepository->findAll()); $this->assertInstanceOf(Tag::class, $this->tagRepository->findAll()->getFirst()); }
/** * @param AssetCollection $assetCollection * @return void */ public function editAssetCollectionAction(AssetCollection $assetCollection) { $this->view->assignMultiple(array('assetCollection' => $assetCollection, 'tags' => $this->tagRepository->findAll())); }