public function testGetParent()
 {
     $parent = $this->createdProperty->getParent();
     $this->assertNotNull($parent);
     $this->assertTrue($this->node->isSame($parent));
 }
 /**
  * Remove the given property, or the value which references the node (when
  * multi-valued).
  *
  * @param NodeInterface     $node
  * @param PropertyInterface $property
  */
 private function dereferenceProperty(NodeInterface $node, PropertyInterface $property)
 {
     if (false === $property->isMultiple()) {
         $property->remove();
         return;
     }
     // dereference from multi-valued referring properties
     $values = $property->getValue();
     foreach ($values as $i => $referencedNode) {
         if ($referencedNode->getIdentifier() === $node->getIdentifier()) {
             unset($values[$i]);
         }
     }
     $property->getParent()->setProperty($property->getName(), $values);
 }