Skip to content

Commit

Permalink
fix: Updated Rumble's tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mpratt committed Nov 17, 2023
1 parent 6138141 commit ba0d44d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Embera/Provider/Rumble.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ class Rumble extends ProviderAdapter implements ProviderInterface
/** inline {@inheritdoc} */
public function validateUrl(Url $url)
{
return (bool) (preg_match('~rumble\.com/embed/([^/]+)~i', (string) $url));
return (bool) (
preg_match('~rumble\.com/([^/]+)\.html~i', (string) $url) ||
preg_match('~rumble\.com/embed/([^/]+)~i', (string) $url)
);
}

/** inline {@inheritdoc} */
Expand Down
2 changes: 1 addition & 1 deletion tests/Embera/Provider/RumbleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ final class RumbleTest extends ProviderTester
'valid_urls' => [
'https://rumble.com/v8ind9-hopping-to-go-outside.html',
'https://rumble.com/v8intx-he-thinks-hes-grown.html',
'https://rumble.com/embed/v3tm912/?pub=4',
],
'invalid_urls' => [
'https://rumble.com/',
'https://rumble.com/folder/v8intx-he-thinks-hes-grown.html',
],
'fake_response' => [
'type' => 'video',
Expand Down

0 comments on commit ba0d44d

Please sign in to comment.