From 5582ba1ecf077691465640ede47e76b8fa8126e6 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Wed, 6 Nov 2024 18:16:11 +0100 Subject: [PATCH] TASK: Rename fake factories to be generically used instead of just for gherkin/behat --- .../Features/Bootstrap/FeatureContext.php | 12 +++---- .../CRBehavioralTestsSubjectProvider.php | 18 +++++----- .../Settings.ContentRepositoryRegistry.yaml | 4 +-- .../Behavior/Bootstrap/FeatureContext.php | 12 +++---- .../WorkspaceWritingDuringRebase.php | 36 +++++-------------- .../Features/Bootstrap/FeatureContext.php | 12 +++---- .../Behavior/Bootstrap/FeatureContext.php | 8 ++--- ... => FakeContentDimensionSourceFactory.php} | 6 +++- ...ory.php => FakeNodeTypeManagerFactory.php} | 5 +-- .../Features/Bootstrap/FeatureContext.php | 12 +++---- .../Behavior/Bootstrap/FeatureContext.php | 8 ++--- 11 files changed, 60 insertions(+), 73 deletions(-) rename Neos.ContentRepository.TestSuite/Classes/Fakes/{GherkinTableNodeBasedContentDimensionSourceFactory.php => FakeContentDimensionSourceFactory.php} (85%) rename Neos.ContentRepository.TestSuite/Classes/Fakes/{GherkinPyStringNodeBasedNodeTypeManagerFactory.php => FakeNodeTypeManagerFactory.php} (83%) diff --git a/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Bootstrap/FeatureContext.php b/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Bootstrap/FeatureContext.php index ced1b64b04..6fa805c907 100644 --- a/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Bootstrap/FeatureContext.php +++ b/Neos.ContentGraph.DoctrineDbalAdapter/Tests/Behavior/Features/Bootstrap/FeatureContext.php @@ -23,8 +23,8 @@ use Neos\ContentRepository\Core\Factory\ContentRepositoryServiceInterface; use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; use Neos\ContentRepository\TestSuite\Behavior\Features\Bootstrap\CRTestSuiteTrait; -use Neos\ContentRepository\TestSuite\Fakes\GherkinPyStringNodeBasedNodeTypeManagerFactory; -use Neos\ContentRepository\TestSuite\Fakes\GherkinTableNodeBasedContentDimensionSourceFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeNodeTypeManagerFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeContentDimensionSourceFactory; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; /** @@ -52,8 +52,8 @@ public function __construct() */ public function resetContentRepositoryComponents(BeforeScenarioScope $scope): void { - GherkinTableNodeBasedContentDimensionSourceFactory::reset(); - GherkinPyStringNodeBasedNodeTypeManagerFactory::reset(); + FakeContentDimensionSourceFactory::reset(); + FakeNodeTypeManagerFactory::reset(); } protected function getContentRepositoryService( @@ -70,8 +70,8 @@ protected function createContentRepository( ): ContentRepository { $this->contentRepositoryRegistry->resetFactoryInstance($contentRepositoryId); $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryId); - GherkinTableNodeBasedContentDimensionSourceFactory::reset(); - GherkinPyStringNodeBasedNodeTypeManagerFactory::reset(); + FakeContentDimensionSourceFactory::reset(); + FakeNodeTypeManagerFactory::reset(); return $contentRepository; } diff --git a/Neos.ContentRepository.BehavioralTests/Classes/TestSuite/Behavior/CRBehavioralTestsSubjectProvider.php b/Neos.ContentRepository.BehavioralTests/Classes/TestSuite/Behavior/CRBehavioralTestsSubjectProvider.php index 47ad3ca055..94b84cdbe1 100644 --- a/Neos.ContentRepository.BehavioralTests/Classes/TestSuite/Behavior/CRBehavioralTestsSubjectProvider.php +++ b/Neos.ContentRepository.BehavioralTests/Classes/TestSuite/Behavior/CRBehavioralTestsSubjectProvider.php @@ -19,9 +19,9 @@ use Doctrine\DBAL\Connection; use Neos\ContentRepository\Core\ContentRepository; use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; -use Neos\ContentRepository\TestSuite\Fakes\GherkinPyStringNodeBasedNodeTypeManagerFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeNodeTypeManagerFactory; use Neos\ContentRepository\TestSuite\Fakes\GherkinTableNodeBasedContentDimensionSource; -use Neos\ContentRepository\TestSuite\Fakes\GherkinTableNodeBasedContentDimensionSourceFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeContentDimensionSourceFactory; use Neos\EventStore\EventStoreInterface; use Symfony\Component\Yaml\Yaml; @@ -60,7 +60,7 @@ protected function getContentRepository(ContentRepositoryId $contentRepositoryId */ public function usingNoContentDimensions(): void { - GherkinTableNodeBasedContentDimensionSourceFactory::setWithoutDimensions(); + FakeContentDimensionSourceFactory::setWithoutDimensions(); } /** @@ -68,7 +68,7 @@ public function usingNoContentDimensions(): void */ public function usingTheFollowingContentDimensions(TableNode $contentDimensions): void { - GherkinTableNodeBasedContentDimensionSourceFactory::setContentDimensionSource( + FakeContentDimensionSourceFactory::setContentDimensionSource( GherkinTableNodeBasedContentDimensionSource::fromGherkinTableNode($contentDimensions) ); } @@ -78,7 +78,7 @@ public function usingTheFollowingContentDimensions(TableNode $contentDimensions) */ public function usingTheFollowingNodeTypes(PyStringNode $serializedNodeTypesConfiguration): void { - GherkinPyStringNodeBasedNodeTypeManagerFactory::setConfiguration(Yaml::parse($serializedNodeTypesConfiguration->getRaw()) ?? []); + FakeNodeTypeManagerFactory::setConfiguration(Yaml::parse($serializedNodeTypesConfiguration->getRaw()) ?? []); } /** @@ -103,8 +103,8 @@ public function iChangeTheContentDimensionsInContentRepositoryTo(string $content } else { $contentRepository = $this->contentRepositories[$contentRepositoryId]; // ensure that the current node types of exactly THE content repository are preserved - GherkinPyStringNodeBasedNodeTypeManagerFactory::setNodeTypeManager($contentRepository->getNodeTypeManager()); - GherkinTableNodeBasedContentDimensionSourceFactory::setContentDimensionSource( + FakeNodeTypeManagerFactory::setNodeTypeManager($contentRepository->getNodeTypeManager()); + FakeContentDimensionSourceFactory::setContentDimensionSource( GherkinTableNodeBasedContentDimensionSource::fromGherkinTableNode($contentDimensions) ); $this->contentRepositories[$contentRepositoryId] = $this->createContentRepository(ContentRepositoryId::fromString($contentRepositoryId)); @@ -126,8 +126,8 @@ public function iChangeTheNodeTypesInContentRepositoryTo( } else { $contentRepository = $this->contentRepositories[$contentRepositoryId]; // ensure that the current node types of exactly THE content repository are preserved - GherkinTableNodeBasedContentDimensionSourceFactory::setContentDimensionSource($contentRepository->getContentDimensionSource()); - GherkinPyStringNodeBasedNodeTypeManagerFactory::setConfiguration(Yaml::parse($serializedNodeTypesConfiguration->getRaw()) ?? []); + FakeContentDimensionSourceFactory::setContentDimensionSource($contentRepository->getContentDimensionSource()); + FakeNodeTypeManagerFactory::setConfiguration(Yaml::parse($serializedNodeTypesConfiguration->getRaw()) ?? []); $this->contentRepositories[$contentRepositoryId] = $this->createContentRepository(ContentRepositoryId::fromString($contentRepositoryId)); if ($this->currentContentRepository->id->value === $contentRepositoryId) { $this->currentContentRepository = $this->contentRepositories[$contentRepositoryId]; diff --git a/Neos.ContentRepository.BehavioralTests/Configuration/Testing/Behat/Settings.ContentRepositoryRegistry.yaml b/Neos.ContentRepository.BehavioralTests/Configuration/Testing/Behat/Settings.ContentRepositoryRegistry.yaml index db115d048a..32f24c1b12 100644 --- a/Neos.ContentRepository.BehavioralTests/Configuration/Testing/Behat/Settings.ContentRepositoryRegistry.yaml +++ b/Neos.ContentRepository.BehavioralTests/Configuration/Testing/Behat/Settings.ContentRepositoryRegistry.yaml @@ -7,6 +7,6 @@ Neos: clock: factoryObjectName: 'Neos\ContentRepository\TestSuite\Fakes\FakeClockFactory' nodeTypeManager: - factoryObjectName: 'Neos\ContentRepository\TestSuite\Fakes\GherkinPyStringNodeBasedNodeTypeManagerFactory' + factoryObjectName: 'Neos\ContentRepository\TestSuite\Fakes\FakeNodeTypeManagerFactory' contentDimensionSource: - factoryObjectName: 'Neos\ContentRepository\TestSuite\Fakes\GherkinTableNodeBasedContentDimensionSourceFactory' + factoryObjectName: 'Neos\ContentRepository\TestSuite\Fakes\FakeContentDimensionSourceFactory' diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Bootstrap/FeatureContext.php b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Bootstrap/FeatureContext.php index 1e71fb0bc1..9646198d20 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Bootstrap/FeatureContext.php +++ b/Neos.ContentRepository.BehavioralTests/Tests/Behavior/Bootstrap/FeatureContext.php @@ -34,8 +34,8 @@ use Neos\ContentRepository\TestSuite\Behavior\Features\Bootstrap\CRTestSuiteTrait; use Neos\ContentRepository\TestSuite\Behavior\Features\Bootstrap\MigrationsTrait; use Neos\ContentRepository\TestSuite\Behavior\Features\Bootstrap\StructureAdjustmentsTrait; -use Neos\ContentRepository\TestSuite\Fakes\GherkinPyStringNodeBasedNodeTypeManagerFactory; -use Neos\ContentRepository\TestSuite\Fakes\GherkinTableNodeBasedContentDimensionSourceFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeNodeTypeManagerFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeContentDimensionSourceFactory; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Flow\Configuration\ConfigurationManager; @@ -106,8 +106,8 @@ public function logToRaceConditionTracker(array $payload): void */ public function resetContentRepositoryComponents(BeforeScenarioScope $scope): void { - GherkinTableNodeBasedContentDimensionSourceFactory::reset(); - GherkinPyStringNodeBasedNodeTypeManagerFactory::reset(); + FakeContentDimensionSourceFactory::reset(); + FakeNodeTypeManagerFactory::reset(); } protected function getContentRepositoryService( @@ -161,8 +161,8 @@ protected function createContentRepository( ): ContentRepository { $this->contentRepositoryRegistry->resetFactoryInstance($contentRepositoryId); $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryId); - GherkinTableNodeBasedContentDimensionSourceFactory::reset(); - GherkinPyStringNodeBasedNodeTypeManagerFactory::reset(); + FakeContentDimensionSourceFactory::reset(); + FakeNodeTypeManagerFactory::reset(); return $contentRepository; } diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Parallel/WorkspaceWritingDuringRebase/WorkspaceWritingDuringRebase.php b/Neos.ContentRepository.BehavioralTests/Tests/Parallel/WorkspaceWritingDuringRebase/WorkspaceWritingDuringRebase.php index 32ffd18d9f..01a14ea75d 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Parallel/WorkspaceWritingDuringRebase/WorkspaceWritingDuringRebase.php +++ b/Neos.ContentRepository.BehavioralTests/Tests/Parallel/WorkspaceWritingDuringRebase/WorkspaceWritingDuringRebase.php @@ -16,9 +16,6 @@ use Neos\ContentRepository\BehavioralTests\Tests\Parallel\AbstractParallelTestCase; use Neos\ContentRepository\Core\ContentRepository; -use Neos\ContentRepository\Core\Dimension\ContentDimension; -use Neos\ContentRepository\Core\Dimension\ContentDimensionId; -use Neos\ContentRepository\Core\Dimension\ContentDimensionSourceInterface; use Neos\ContentRepository\Core\DimensionSpace\DimensionSpacePoint; use Neos\ContentRepository\Core\DimensionSpace\OriginDimensionSpacePoint; use Neos\ContentRepository\Core\Feature\NodeCreation\Command\CreateNodeAggregateWithNode; @@ -29,7 +26,6 @@ use Neos\ContentRepository\Core\Feature\WorkspaceCreation\Command\CreateWorkspace; use Neos\ContentRepository\Core\Feature\WorkspaceRebase\Command\RebaseWorkspace; use Neos\ContentRepository\Core\Feature\WorkspaceRebase\Dto\RebaseErrorHandlingStrategy; -use Neos\ContentRepository\Core\NodeType\NodeTypeManager; use Neos\ContentRepository\Core\NodeType\NodeTypeName; use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints; use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; @@ -37,8 +33,8 @@ use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; -use Neos\ContentRepository\TestSuite\Fakes\GherkinPyStringNodeBasedNodeTypeManagerFactory; -use Neos\ContentRepository\TestSuite\Fakes\GherkinTableNodeBasedContentDimensionSourceFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeContentDimensionSourceFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeNodeTypeManagerFactory; use Neos\EventStore\Exception\ConcurrencyException; use Neos\Flow\ObjectManagement\ObjectManagerInterface; use PHPUnit\Framework\Assert; @@ -57,27 +53,13 @@ public function setUp(): void { parent::setUp(); $this->log('------ process started ------'); - // todo refrain from Gherkin naming here and make fakes easier to use: https://github.com/neos/neos-development-collection/pull/5346 - GherkinTableNodeBasedContentDimensionSourceFactory::$contentDimensionsToUse = new class implements ContentDimensionSourceInterface - { - public function getDimension(ContentDimensionId $dimensionId): ?ContentDimension - { - return null; - } - public function getContentDimensionsOrderedByPriority(): array - { - return []; - } - }; - // todo refrain from Gherkin naming here and make fakes easier to use: https://github.com/neos/neos-development-collection/pull/5346 - GherkinPyStringNodeBasedNodeTypeManagerFactory::$nodeTypesToUse = new NodeTypeManager( - fn (): array => [ - 'Neos.ContentRepository:Root' => [], - 'Neos.ContentRepository.Testing:Document' => [ - 'properties' => [ - 'title' => [ - 'type' => 'string' - ] + FakeContentDimensionSourceFactory::setWithoutDimensions(); + FakeNodeTypeManagerFactory::setConfiguration([ + 'Neos.ContentRepository:Root' => [], + 'Neos.ContentRepository.Testing:Document' => [ + 'properties' => [ + 'title' => [ + 'type' => 'string' ] ] ] diff --git a/Neos.ContentRepository.Export/Tests/Behavior/Features/Bootstrap/FeatureContext.php b/Neos.ContentRepository.Export/Tests/Behavior/Features/Bootstrap/FeatureContext.php index 6700478b68..15543eef06 100644 --- a/Neos.ContentRepository.Export/Tests/Behavior/Features/Bootstrap/FeatureContext.php +++ b/Neos.ContentRepository.Export/Tests/Behavior/Features/Bootstrap/FeatureContext.php @@ -23,8 +23,8 @@ use Neos\ContentRepository\Core\Factory\ContentRepositoryServiceInterface; use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; use Neos\ContentRepository\TestSuite\Behavior\Features\Bootstrap\CRTestSuiteTrait; -use Neos\ContentRepository\TestSuite\Fakes\GherkinPyStringNodeBasedNodeTypeManagerFactory; -use Neos\ContentRepository\TestSuite\Fakes\GherkinTableNodeBasedContentDimensionSourceFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeNodeTypeManagerFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeContentDimensionSourceFactory; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; /** @@ -52,8 +52,8 @@ public function __construct() */ public function resetContentRepositoryComponents(BeforeScenarioScope $scope): void { - GherkinTableNodeBasedContentDimensionSourceFactory::reset(); - GherkinPyStringNodeBasedNodeTypeManagerFactory::reset(); + FakeContentDimensionSourceFactory::reset(); + FakeNodeTypeManagerFactory::reset(); } protected function getContentRepositoryService( @@ -70,8 +70,8 @@ protected function createContentRepository( ): ContentRepository { $this->contentRepositoryRegistry->resetFactoryInstance($contentRepositoryId); $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryId); - GherkinTableNodeBasedContentDimensionSourceFactory::reset(); - GherkinPyStringNodeBasedNodeTypeManagerFactory::reset(); + FakeContentDimensionSourceFactory::reset(); + FakeNodeTypeManagerFactory::reset(); return $contentRepository; } diff --git a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Bootstrap/FeatureContext.php b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Bootstrap/FeatureContext.php index 2aa7076e72..eeae7a0662 100644 --- a/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Bootstrap/FeatureContext.php +++ b/Neos.ContentRepository.LegacyNodeMigration/Tests/Behavior/Bootstrap/FeatureContext.php @@ -31,8 +31,8 @@ use Neos\ContentRepository\LegacyNodeMigration\NodeDataToEventsProcessor; use Neos\ContentRepository\LegacyNodeMigration\RootNodeTypeMapping; use Neos\ContentRepository\TestSuite\Behavior\Features\Bootstrap\CRTestSuiteTrait; -use Neos\ContentRepository\TestSuite\Fakes\GherkinPyStringNodeBasedNodeTypeManagerFactory; -use Neos\ContentRepository\TestSuite\Fakes\GherkinTableNodeBasedContentDimensionSourceFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeNodeTypeManagerFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeContentDimensionSourceFactory; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Flow\Property\PropertyMapper; use Neos\Flow\ResourceManagement\PersistentResource; @@ -425,8 +425,8 @@ protected function createContentRepository( ): ContentRepository { $this->contentRepositoryRegistry->resetFactoryInstance($contentRepositoryId); $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryId); - GherkinTableNodeBasedContentDimensionSourceFactory::reset(); - GherkinPyStringNodeBasedNodeTypeManagerFactory::reset(); + FakeContentDimensionSourceFactory::reset(); + FakeNodeTypeManagerFactory::reset(); return $contentRepository; } diff --git a/Neos.ContentRepository.TestSuite/Classes/Fakes/GherkinTableNodeBasedContentDimensionSourceFactory.php b/Neos.ContentRepository.TestSuite/Classes/Fakes/FakeContentDimensionSourceFactory.php similarity index 85% rename from Neos.ContentRepository.TestSuite/Classes/Fakes/GherkinTableNodeBasedContentDimensionSourceFactory.php rename to Neos.ContentRepository.TestSuite/Classes/Fakes/FakeContentDimensionSourceFactory.php index ea7cbc1a28..66a2bbd612 100644 --- a/Neos.ContentRepository.TestSuite/Classes/Fakes/GherkinTableNodeBasedContentDimensionSourceFactory.php +++ b/Neos.ContentRepository.TestSuite/Classes/Fakes/FakeContentDimensionSourceFactory.php @@ -10,7 +10,11 @@ use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; use Neos\ContentRepositoryRegistry\Factory\ContentDimensionSource\ContentDimensionSourceFactoryInterface; -class GherkinTableNodeBasedContentDimensionSourceFactory implements ContentDimensionSourceFactoryInterface +/** + * Fake factory for testing. Note that the factory MUST be initialised BEFORE the content repository is fetched. + * Any changes after initialing a cr are lost UNLESS the content repository is rebuild. + */ +class FakeContentDimensionSourceFactory implements ContentDimensionSourceFactoryInterface { private static ?ContentDimensionSourceInterface $contentDimensionSource = null; diff --git a/Neos.ContentRepository.TestSuite/Classes/Fakes/GherkinPyStringNodeBasedNodeTypeManagerFactory.php b/Neos.ContentRepository.TestSuite/Classes/Fakes/FakeNodeTypeManagerFactory.php similarity index 83% rename from Neos.ContentRepository.TestSuite/Classes/Fakes/GherkinPyStringNodeBasedNodeTypeManagerFactory.php rename to Neos.ContentRepository.TestSuite/Classes/Fakes/FakeNodeTypeManagerFactory.php index aa17332e15..2d67e53323 100644 --- a/Neos.ContentRepository.TestSuite/Classes/Fakes/GherkinPyStringNodeBasedNodeTypeManagerFactory.php +++ b/Neos.ContentRepository.TestSuite/Classes/Fakes/FakeNodeTypeManagerFactory.php @@ -19,9 +19,10 @@ use Neos\ContentRepositoryRegistry\Factory\NodeTypeManager\NodeTypeManagerFactoryInterface; /** - * Factory for node type managers from gherkin py strings + * Fake factory for testing. Note that the factory MUST be initialised BEFORE the content repository is fetched. + * Any changes after initialing a cr are lost UNLESS the content repository is rebuild. */ -final class GherkinPyStringNodeBasedNodeTypeManagerFactory implements NodeTypeManagerFactoryInterface +final class FakeNodeTypeManagerFactory implements NodeTypeManagerFactoryInterface { private static ?NodeTypeManager $nodeTypeManager = null; diff --git a/Neos.Neos/Tests/Behavior/Features/Bootstrap/FeatureContext.php b/Neos.Neos/Tests/Behavior/Features/Bootstrap/FeatureContext.php index fdb2e2d988..e8636b4aac 100644 --- a/Neos.Neos/Tests/Behavior/Features/Bootstrap/FeatureContext.php +++ b/Neos.Neos/Tests/Behavior/Features/Bootstrap/FeatureContext.php @@ -21,8 +21,8 @@ use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; use Neos\ContentRepository\TestSuite\Behavior\Features\Bootstrap\CRTestSuiteTrait; use Neos\ContentRepository\TestSuite\Behavior\Features\Bootstrap\MigrationsTrait; -use Neos\ContentRepository\TestSuite\Fakes\GherkinPyStringNodeBasedNodeTypeManagerFactory; -use Neos\ContentRepository\TestSuite\Fakes\GherkinTableNodeBasedContentDimensionSourceFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeNodeTypeManagerFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeContentDimensionSourceFactory; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\Flow\Persistence\PersistenceManagerInterface; use Neos\Flow\Utility\Environment; @@ -73,8 +73,8 @@ public function __construct() */ public function resetContentRepositoryComponents(): void { - GherkinTableNodeBasedContentDimensionSourceFactory::reset(); - GherkinPyStringNodeBasedNodeTypeManagerFactory::reset(); + FakeContentDimensionSourceFactory::reset(); + FakeNodeTypeManagerFactory::reset(); } /** @@ -106,8 +106,8 @@ protected function createContentRepository( ): ContentRepository { $this->contentRepositoryRegistry->resetFactoryInstance($contentRepositoryId); $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryId); - GherkinTableNodeBasedContentDimensionSourceFactory::reset(); - GherkinPyStringNodeBasedNodeTypeManagerFactory::reset(); + FakeContentDimensionSourceFactory::reset(); + FakeNodeTypeManagerFactory::reset(); return $contentRepository; } diff --git a/Neos.TimeableNodeVisibility/Tests/Behavior/Bootstrap/FeatureContext.php b/Neos.TimeableNodeVisibility/Tests/Behavior/Bootstrap/FeatureContext.php index 52e906898d..2656730cb9 100644 --- a/Neos.TimeableNodeVisibility/Tests/Behavior/Bootstrap/FeatureContext.php +++ b/Neos.TimeableNodeVisibility/Tests/Behavior/Bootstrap/FeatureContext.php @@ -12,8 +12,8 @@ use Neos\ContentRepository\Core\SharedModel\ContentRepository\ContentRepositoryId; use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName; use Neos\ContentRepository\TestSuite\Behavior\Features\Bootstrap\CRTestSuiteTrait; -use Neos\ContentRepository\TestSuite\Fakes\GherkinPyStringNodeBasedNodeTypeManagerFactory; -use Neos\ContentRepository\TestSuite\Fakes\GherkinTableNodeBasedContentDimensionSourceFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeNodeTypeManagerFactory; +use Neos\ContentRepository\TestSuite\Fakes\FakeContentDimensionSourceFactory; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; use Neos\TimeableNodeVisibility\Service\TimeableNodeVisibilityService; use PHPUnit\Framework\Assert; @@ -91,8 +91,8 @@ protected function createContentRepository( ): ContentRepository { $this->contentRepositoryRegistry->resetFactoryInstance($contentRepositoryId); $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryId); - GherkinTableNodeBasedContentDimensionSourceFactory::reset(); - GherkinPyStringNodeBasedNodeTypeManagerFactory::reset(); + FakeContentDimensionSourceFactory::reset(); + FakeNodeTypeManagerFactory::reset(); return $contentRepository; }