feat: ship creator journey v2 and profile updates

This commit is contained in:
2026-04-12 21:42:07 +02:00
parent a2457f4e49
commit d5cff21ea2
335 changed files with 20147 additions and 1545 deletions

View File

@@ -0,0 +1,33 @@
<?php
use App\Support\Seo\SeoDataBuilder;
use Tests\TestCase;
uses(TestCase::class);
it('normalizes a single associative structured data schema', function () {
$seo = SeoDataBuilder::fromArray([
'title' => 'Categories',
'structured_data' => [
'@context' => 'https://schema.org',
'@type' => 'CollectionPage',
'name' => 'Categories',
],
])->build()->toArray();
expect($seo['json_ld'] ?? [])
->toHaveCount(1)
->and($seo['json_ld'][0]['@type'] ?? null)->toBe('CollectionPage');
});
it('normalizes JSON string structured data schemas', function () {
$seo = SeoDataBuilder::fromArray([
'title' => 'Categories',
'structured_data' => '{"@context":"https://schema.org","@type":"CollectionPage","name":"Categories"}',
])->build()->toArray();
expect($seo['json_ld'] ?? [])
->toHaveCount(1)
->and($seo['json_ld'][0]['@context'] ?? null)->toBe('https://schema.org')
->and($seo['json_ld'][0]['@type'] ?? null)->toBe('CollectionPage');
});