/** * @test */ public function removeChildren4FromObjectStorageHoldingChildren4() { $children4 = new \FIXTURE\TestExtension\Domain\Model\Child4(); $children4ObjectStorageMock = $this->getMock(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class, ['detach'], [], '', false); $children4ObjectStorageMock->expects(self::once())->method('detach')->with(self::equalTo($children4)); $this->inject($this->subject, 'children4', $children4ObjectStorageMock); $this->subject->removeChildren4($children4); }
/** * @test */ public function removeChildren4FromObjectStorageHoldingChildren4() { $children4 = new \FIXTURE\TestExtension\Domain\Model\Child4(); $children4ObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('detach'), array(), '', FALSE); $children4ObjectStorageMock->expects($this->once())->method('detach')->with($this->equalTo($children4)); $this->inject($this->subject, 'children4', $children4ObjectStorageMock); $this->subject->removeChildren4($children4); }