Skip to content

Add test for route update for cross site changes #7834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented Mar 5, 2025

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #
Related issues/PRs parts of #7726
License MIT
Documentation PR sulu/sulu-docs#

What's in this PR?

Add test for route update for cross site updates.

Why?

If I have an article which are not site specific and it is connected to a page.

@alexander-schranz alexander-schranz added the DX Affecting the end developer label Mar 5, 2025
@alexander-schranz alexander-schranz force-pushed the feature/route-handling-cross-site-updates branch from f350216 to a0a52c0 Compare March 5, 2025 16:05
@alexander-schranz alexander-schranz mentioned this pull request Mar 5, 2025
17 tasks
@alexander-schranz alexander-schranz force-pushed the feature/route-handling-cross-site-updates branch from a0a52c0 to 6f33912 Compare March 5, 2025 16:08
@@ -53,6 +53,7 @@ public function testUpdateRoute(
array $routes,
string $changeRoute,
array $expectedRoutes,
int $expectedChangedRoutes,
Copy link
Member Author

@alexander-schranz alexander-schranz Mar 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introduced a bug which skipped the expectedHistoryRoutes part. with additional assertCount this can now not longer happen.

@alexander-schranz alexander-schranz changed the title Add test for route update for cross site updates Add test for route update for cross site changes Mar 5, 2025
@alexander-schranz alexander-schranz added the Bug Error or unexpected behavior of already existing functionality label Mar 5, 2025
@alexander-schranz alexander-schranz marked this pull request as ready for review March 5, 2025 16:13
$this->assertSame('page::' . $expectedHistoryRoute['resourceId'], $route->getResourceId(), $additionalErrorInfoMessage);
}
$this->assertCount($expectedChangedRoutes, $expectedHistoryRoutes);
foreach ($expectedHistoryRoutes as $expectedHistoryRoute) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no changes here removed unnecessary if

@alexander-schranz alexander-schranz merged commit b67f994 into sulu:3.0 Mar 5, 2025
8 of 9 checks passed
@alexander-schranz alexander-schranz deleted the feature/route-handling-cross-site-updates branch March 5, 2025 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error or unexpected behavior of already existing functionality DX Affecting the end developer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant