Skip to content

Commit

Permalink
FEATURE: Workspace aware content cache
Browse files Browse the repository at this point in the history
  • Loading branch information
dlubitz committed May 15, 2024
1 parent e3cb4fc commit 0787837
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions Neos.Neos/Tests/Unit/Fusion/Helper/CachingHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ public function nodeTypeTagDataProvider()
$nodeTypeName3 = 'Neos.Neos:Moo';

return [
[$nodeTypeName1, ['NodeType_90ce081cc57c057ff24ad13818166a6c64a38eda_Neos_Neos-Foo']],
[$nodeTypeName1, ['NodeType_364cfc8e70b2baa23dbd14503d2bd00e063829e7_Neos_Neos-Foo']],
[[$nodeTypeName1, $nodeTypeName2, $nodeTypeName3],
[
'NodeType_90ce081cc57c057ff24ad13818166a6c64a38eda_Neos_Neos-Foo',
'NodeType_90ce081cc57c057ff24ad13818166a6c64a38eda_Neos_Neos-Bar',
'NodeType_90ce081cc57c057ff24ad13818166a6c64a38eda_Neos_Neos-Moo',
'NodeType_364cfc8e70b2baa23dbd14503d2bd00e063829e7_Neos_Neos-Foo',
'NodeType_364cfc8e70b2baa23dbd14503d2bd00e063829e7_Neos_Neos-Bar',
'NodeType_364cfc8e70b2baa23dbd14503d2bd00e063829e7_Neos_Neos-Moo',
]
],
[(new \ArrayObject([$nodeTypeName1, $nodeTypeName2, $nodeTypeName3])),
[
'NodeType_90ce081cc57c057ff24ad13818166a6c64a38eda_Neos_Neos-Foo',
'NodeType_90ce081cc57c057ff24ad13818166a6c64a38eda_Neos_Neos-Bar',
'NodeType_90ce081cc57c057ff24ad13818166a6c64a38eda_Neos_Neos-Moo',
'NodeType_364cfc8e70b2baa23dbd14503d2bd00e063829e7_Neos_Neos-Foo',
'NodeType_364cfc8e70b2baa23dbd14503d2bd00e063829e7_Neos_Neos-Bar',
'NodeType_364cfc8e70b2baa23dbd14503d2bd00e063829e7_Neos_Neos-Moo',
]
],
];
Expand Down Expand Up @@ -103,15 +103,15 @@ public function nodeDataProvider()
$node2 = $this->createNode(NodeAggregateId::fromString($nodeIdentifier2));

return [
[$node1, ['Node_90ce081cc57c057ff24ad13818166a6c64a38eda_ca511a55-c5c0-f7d7-8d71-8edeffc75306']],
[[$node1], ['Node_90ce081cc57c057ff24ad13818166a6c64a38eda_ca511a55-c5c0-f7d7-8d71-8edeffc75306']],
[$node1, ['Node_364cfc8e70b2baa23dbd14503d2bd00e063829e7_ca511a55-c5c0-f7d7-8d71-8edeffc75306']],
[[$node1], ['Node_364cfc8e70b2baa23dbd14503d2bd00e063829e7_ca511a55-c5c0-f7d7-8d71-8edeffc75306']],
[[$node1, $node2], [
'Node_90ce081cc57c057ff24ad13818166a6c64a38eda_ca511a55-c5c0-f7d7-8d71-8edeffc75306',
'Node_90ce081cc57c057ff24ad13818166a6c64a38eda_7005c7cf-4d19-ce36-0873-476b6cadb71a'
'Node_364cfc8e70b2baa23dbd14503d2bd00e063829e7_ca511a55-c5c0-f7d7-8d71-8edeffc75306',
'Node_364cfc8e70b2baa23dbd14503d2bd00e063829e7_7005c7cf-4d19-ce36-0873-476b6cadb71a'
]],
[(new \ArrayObject([$node1, $node2])), [
'Node_90ce081cc57c057ff24ad13818166a6c64a38eda_ca511a55-c5c0-f7d7-8d71-8edeffc75306',
'Node_90ce081cc57c057ff24ad13818166a6c64a38eda_7005c7cf-4d19-ce36-0873-476b6cadb71a'
'Node_364cfc8e70b2baa23dbd14503d2bd00e063829e7_ca511a55-c5c0-f7d7-8d71-8edeffc75306',
'Node_364cfc8e70b2baa23dbd14503d2bd00e063829e7_7005c7cf-4d19-ce36-0873-476b6cadb71a'
]]
];
}
Expand Down Expand Up @@ -142,7 +142,7 @@ public function nodeTagsCanBeInitializedWithAnIdentifierString()

$actual = $helper->nodeTagForIdentifier($nodeIdentifier, $node);

self::assertEquals('Node_90ce081cc57c057ff24ad13818166a6c64a38eda_ca511a55-c5c0-f7d7-8d71-8edeffc75306', $actual);
self::assertEquals('Node_364cfc8e70b2baa23dbd14503d2bd00e063829e7_ca511a55-c5c0-f7d7-8d71-8edeffc75306', $actual);
}

/**
Expand All @@ -156,7 +156,7 @@ public function nodeTagForIdentifierStringWillFallbackToLegacyTagIfNoContextNode
$contextNode = $this->createNode(NodeAggregateId::fromString("na"));

$actual = $helper->nodeTagForIdentifier($identifier, $contextNode);
self::assertEquals('Node_90ce081cc57c057ff24ad13818166a6c64a38eda_some-uuid-identifier', $actual);
self::assertEquals('Node_364cfc8e70b2baa23dbd14503d2bd00e063829e7_some-uuid-identifier', $actual);
}

public function descendantOfDataProvider()
Expand All @@ -169,15 +169,15 @@ public function descendantOfDataProvider()


return [
[$node1, ['DescendantOf_90ce081cc57c057ff24ad13818166a6c64a38eda_ca511a55-c5c0-f7d7-8d71-8edeffc75306']],
[[$node1], ['DescendantOf_90ce081cc57c057ff24ad13818166a6c64a38eda_ca511a55-c5c0-f7d7-8d71-8edeffc75306']],
[$node1, ['DescendantOf_364cfc8e70b2baa23dbd14503d2bd00e063829e7_ca511a55-c5c0-f7d7-8d71-8edeffc75306']],
[[$node1], ['DescendantOf_364cfc8e70b2baa23dbd14503d2bd00e063829e7_ca511a55-c5c0-f7d7-8d71-8edeffc75306']],
[[$node1, $node2], [
'DescendantOf_90ce081cc57c057ff24ad13818166a6c64a38eda_ca511a55-c5c0-f7d7-8d71-8edeffc75306',
'DescendantOf_90ce081cc57c057ff24ad13818166a6c64a38eda_7005c7cf-4d19-ce36-0873-476b6cadb71a'
'DescendantOf_364cfc8e70b2baa23dbd14503d2bd00e063829e7_ca511a55-c5c0-f7d7-8d71-8edeffc75306',
'DescendantOf_364cfc8e70b2baa23dbd14503d2bd00e063829e7_7005c7cf-4d19-ce36-0873-476b6cadb71a'
]],
[(new \ArrayObject([$node1, $node2])), [
'DescendantOf_90ce081cc57c057ff24ad13818166a6c64a38eda_ca511a55-c5c0-f7d7-8d71-8edeffc75306',
'DescendantOf_90ce081cc57c057ff24ad13818166a6c64a38eda_7005c7cf-4d19-ce36-0873-476b6cadb71a'
'DescendantOf_364cfc8e70b2baa23dbd14503d2bd00e063829e7_ca511a55-c5c0-f7d7-8d71-8edeffc75306',
'DescendantOf_364cfc8e70b2baa23dbd14503d2bd00e063829e7_7005c7cf-4d19-ce36-0873-476b6cadb71a'
]]
];
}
Expand Down

0 comments on commit 0787837

Please sign in to comment.