Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ public static function vendorPackageProvider(): \Generator
// core
yield 'core no version' => ['typo3/cms-adminpanel', 'core', 'typo3', 'cms-adminpanel', null];
yield 'core with version' => ['typo3/cms-adminpanel/13.4', 'core', 'typo3', 'cms-adminpanel', '13.4'];
yield 'core without cms prefix, no version' => ['typo3/theme-camino', 'core', 'typo3', 'theme-camino', null];
yield 'core without cms prefix, with version' => ['typo3/theme-camino/13.4', 'core', 'typo3', 'theme-camino', '13.4'];

// generic package
yield 'package' => ['georgringer/news', 'package', 'georgringer', 'news', null];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@ public function legacy_ext_behaves_like_core_and_uses_preferred(): void
);
}

#[Test]
public function theme_ext_behaves_like_core_and_uses_preferred(): void
{
$this->versions->method('getPreferredVersion')->willReturn('13.4');
$this->versions->method('resolveCoreVersion')->willReturn('13.4');

$builder = new DefaultInventoryUrlBuilder($this->versions);
$parts = new InterlinkParts('typo3/theme-camino', 'core', 'typo3', 'theme-camino', null);

self::assertSame(
'https://docs.typo3.org/c/typo3/theme-camino/13.4/en-us/',
$builder->buildUrl($parts)
);
}

#[Test]
#[DataProvider('packageVersions')]
public function third_party_packages_use_p_namespace_and_generic_version_resolution(string $inputVersion, string $resolvedMinor, string $expectedUrl): void
Expand Down