-
Notifications
You must be signed in to change notification settings - Fork 46
fix: corrigir novo campo de skills, adicionado linkedin e links redirect #443
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
Open
fernanduandrade
wants to merge
4
commits into
he4rt:4.x
Choose a base branch
from
fernanduandrade:fix/profile-add-skill
base: 4.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
cde25c3
fix: corrigir novo campo de skills, adicionado linkedin e links redir…
fernanduandrade 9959ce7
fix(Profile): ajustar de acordo com a análise do phpstan
fernanduandrade 9b03e3b
Merge branch '4.x' into fix/profile-add-skill
fernanduandrade 3431bad
Merge branch '4.x' into fix/profile-add-skill
fernanduandrade File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| use He4rt\Profile\Enums\SocialPlatform; | ||
|
|
||
| dataset('username handles', [ | ||
| 'plain username' => ['johndoe'], | ||
| 'username with @' => ['@johndoe'], | ||
| ]); | ||
|
|
||
| test('instagram builds correct url from handle', function (string $handle): void { | ||
| expect(SocialPlatform::Instagram->getUrl($handle)) | ||
| ->toBe('https://instagram.com/johndoe'); | ||
| })->with('username handles'); | ||
|
|
||
| test('twitter builds correct url from handle', function (string $handle): void { | ||
| expect(SocialPlatform::Twitter->getUrl($handle)) | ||
| ->toBe('https://x.com/johndoe'); | ||
| })->with('username handles'); | ||
|
|
||
| test('linkedin builds correct url from handle', function (string $handle): void { | ||
| expect(SocialPlatform::LinkedIn->getUrl($handle)) | ||
| ->toBe('https://linkedin.com/in/johndoe'); | ||
| })->with('username handles'); | ||
|
|
||
| test('youtube builds correct url from handle', function (string $handle): void { | ||
| expect(SocialPlatform::YouTube->getUrl($handle)) | ||
| ->toBe('https://youtube.com/@johndoe'); | ||
| })->with('username handles'); | ||
|
|
||
| test('bluesky builds correct url from handle', function (string $handle): void { | ||
| expect(SocialPlatform::Bluesky->getUrl($handle)) | ||
| ->toBe('https://bsky.app/profile/johndoe'); | ||
| })->with('username handles'); | ||
|
|
||
| test('website prepends https when no scheme is provided', function (): void { | ||
| expect(SocialPlatform::Website->getUrl('example.dev')) | ||
| ->toBe('https://example.dev'); | ||
| }); | ||
|
|
||
| test('full https url is returned as-is for any platform', function (): void { | ||
| $url = 'https://www.linkedin.com/in/johndoe/'; | ||
|
|
||
| expect(SocialPlatform::LinkedIn->getUrl($url))->toBe($url); | ||
| }); | ||
|
|
||
| test('full http url is returned as-is for any platform', function (): void { | ||
| $url = 'http://example.dev'; | ||
|
|
||
| expect(SocialPlatform::Website->getUrl($url))->toBe($url); | ||
| }); | ||
|
|
||
| test('full url is not double-prefixed for all platforms', function (): void { | ||
| foreach (SocialPlatform::cases() as $platform) { | ||
| $url = 'https://example.com/foo'; | ||
| expect($platform->getUrl($url))->toBe($url); | ||
| } | ||
| }); |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.