예제 #1
0
 /**
  * @test
  */
 public function removeCategoryFromObjectStorageHoldingCategory()
 {
     $category = new \DERHANSEN\SfBanners\Domain\Model\Category();
     $categoryObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('detach'), array(), '', false);
     $categoryObjectStorageMock->expects($this->once())->method('detach')->with($this->equalTo($category));
     $this->inject($this->fixture, 'category', $categoryObjectStorageMock);
     $this->fixture->removeCategory($category);
 }