/** * @test * @return void */ public function removePriceOptionRemovesPriceOptionForPriceOption() { $priceOption = new \DERHANSEN\SfEventMgt\Domain\Model\PriceOption(); $priceOptionObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', ['detach'], [], '', false); $priceOptionObjectStorageMock->expects($this->once())->method('detach')->with($this->equalTo($priceOption)); $this->inject($this->subject, 'priceOptions', $priceOptionObjectStorageMock); $this->subject->removePriceOptions($priceOption); }