/**
  * @test
  */
 public function aContentObjectCanBeSetRetrievedAndUnset()
 {
     $contentObject = new \stdClass();
     $this->nodeData->setContentObject($contentObject);
     $this->assertSame($contentObject, $this->nodeData->getContentObject());
     $this->nodeData->unsetContentObject();
     $this->assertNull($this->nodeData->getContentObject());
 }
Пример #2
0
 /**
  * Unsets the content object of this node.
  *
  * @return void
  * @api
  */
 public function unsetContentObject()
 {
     if (!$this->isNodeDataMatchingContext()) {
         $this->materializeNodeData();
     }
     $this->nodeData->unsetContentObject();
     $this->context->getFirstLevelNodeCache()->flush();
     $this->emitNodeUpdated($this);
 }