/** * @test */ public function setCategoryForObjectStorageContainingCategorySetsCategory() { $category = new \JS\JsEvent\Domain\Model\Category(); $objectStorageHoldingExactlyOneCategory = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); $objectStorageHoldingExactlyOneCategory->attach($category); $this->subject->setCategory($objectStorageHoldingExactlyOneCategory); $this->assertAttributeEquals($objectStorageHoldingExactlyOneCategory, 'category', $this->subject); }