Example #1
0
 /**
  * @test
  */
 public function addCategoryToObjectStorageHoldingCategory()
 {
     $category = new \JS\JsEvent\Domain\Model\Category();
     $categoryObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('attach'), array(), '', FALSE);
     $categoryObjectStorageMock->expects($this->once())->method('attach')->with($this->equalTo($category));
     $this->inject($this->subject, 'category', $categoryObjectStorageMock);
     $this->subject->addCategory($category);
 }