Unverified Commit 867ecd84 authored by larowlan's avatar larowlan

Issue #2908674 by tedbow: When using get() method directly on PathItem the alias is not loaded

parent 647b586b
......@@ -111,6 +111,14 @@ public function set($property_name, $value, $notify = TRUE) {
return parent::set($property_name, $value, $notify);
}
/**
* {@inheritdoc}
*/
public function get($property_name) {
$this->ensureLoaded();
return parent::get($property_name);
}
/**
* {@inheritdoc}
*/
......
......@@ -70,6 +70,9 @@ public function testPathItem() {
$loaded_node = $node_storage->load($node->id());
$this->assertFalse($loaded_node->get('path')->isEmpty());
$this->assertEquals('/foo', $loaded_node->get('path')->alias);
$node_storage->resetCache();
$loaded_node = $node_storage->load($node->id());
$this->assertEquals('/foo', $loaded_node->get('path')[0]->get('alias')->getValue());
$node_storage->resetCache();
$loaded_node = $node_storage->load($node->id());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment