Beispiel #1
0
 /**
  * @test
  */
 public function addChildren2ToObjectStorageHoldingChildren2()
 {
     $children2 = new \FIXTURE\TestExtension\Domain\Model\Child2();
     $children2ObjectStorageMock = $this->getMock(\TYPO3\CMS\Extbase\Persistence\ObjectStorage::class, ['attach'], [], '', false);
     $children2ObjectStorageMock->expects(self::once())->method('attach')->with(self::equalTo($children2));
     $this->inject($this->subject, 'children2', $children2ObjectStorageMock);
     $this->subject->addChildren2($children2);
 }
Beispiel #2
0
 /**
  * @test
  */
 public function addChildren2ToObjectStorageHoldingChildren2()
 {
     $children2 = new \FIXTURE\TestExtension\Domain\Model\Child2();
     $children2ObjectStorageMock = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage', array('attach'), array(), '', FALSE);
     $children2ObjectStorageMock->expects($this->once())->method('attach')->with($this->equalTo($children2));
     $this->inject($this->subject, 'children2', $children2ObjectStorageMock);
     $this->subject->addChildren2($children2);
 }