public function testNewProperty() { $data = ['title' => 'Testname', 'tags' => ['tag1', 'tag2'], 'url' => '/news/test', 'article' => 'sulu_io']; $contentBefore = $this->mapper->save($data, 'overview', 'sulu_io', 'de', 1); $root = $this->session->getRootNode(); $route = $root->getNode('cmf/sulu_io/routes/de/news/test'); /** @var NodeInterface $contentNode */ $contentNode = $route->getPropertyValue('sulu:content'); // simulate new property article, by deleting the property /** @var PropertyInterface $articleProperty */ $articleProperty = $contentNode->getProperty($this->languageNamespace . ':de-article'); $this->session->removeItem($articleProperty->getPath()); $this->session->save(); $this->documentManager->clear(); /** @var StructureInterface $content */ $content = $this->mapper->load($contentBefore->getUuid(), 'sulu_io', 'de'); // test values $this->assertEquals('Testname', $content->title); $this->assertEquals(null, $content->article); $this->assertEquals('/news/test', $content->url); $this->assertEquals(['tag1', 'tag2'], $content->tags); $this->assertEquals(StructureInterface::STATE_TEST, $content->getNodeState()); $this->assertEquals(1, $content->getCreator()); $this->assertEquals(1, $content->getChanger()); }