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