Beispiel #1
0
 /**
  * @test
  */
 public function removeTranslationFromObjectStorageHoldingTranslations()
 {
     $translation = new \TYPO3\CMS\Documentation\Domain\Model\DocumentTranslation();
     $localObjectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
     $localObjectStorage->attach($translation);
     $localObjectStorage->detach($translation);
     $this->fixture->addTranslation($translation);
     $this->fixture->removeTranslation($translation);
     $this->assertEquals($localObjectStorage, $this->fixture->getTranslations());
 }
 /**
  * @test
  */
 public function removeFormatFromObjectStorageHoldingFormats()
 {
     $format = new \TYPO3\CMS\Documentation\Domain\Model\DocumentFormat();
     $localObjectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
     $localObjectStorage->attach($format);
     $localObjectStorage->detach($format);
     $this->subject->addFormat($format);
     $this->subject->removeFormat($format);
     $this->assertEquals($localObjectStorage, $this->subject->getFormats());
 }
 /**
  * @test
  */
 public function allRelationsAreNotDirtyOnAttachingAndRemoving()
 {
     $objectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
     $object1 = new \StdClass();
     $object2 = new \StdClass();
     $object3 = new \StdClass();
     $objectStorage->attach($object1);
     $objectStorage->attach($object2);
     $objectStorage->detach($object2);
     $objectStorage->attach($object3);
     $this->assertFalse($objectStorage->isRelationDirty($object1));
     $this->assertFalse($objectStorage->isRelationDirty($object3));
 }
 /**
  * @test
  */
 public function removeAttributeFromObjectStorageHoldingAttributes()
 {
     $attribute = new \Aijko\SharepointConnector\Domain\Model\Mapping\Attribute();
     $localObjectStorage = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
     $localObjectStorage->attach($attribute);
     $localObjectStorage->detach($attribute);
     $this->fixture->addAttribute($attribute);
     $this->fixture->removeAttribute($attribute);
     $this->assertEquals($localObjectStorage, $this->fixture->getAttributes());
 }