{"action":"created","comment":{"url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/pulls/comments/42518929","id":42518929,"diff_hunk":"@@ -0,0 +1,110 @@\n+<?php\n+\n+/**\n+ * @file\n+ * Contains \\Drupal\\media_entity_embeddable_video\\Kernel\\Extension\\VideoProviderMatchConstraintTest.\n+ */\n+\n+namespace Drupal\\media_entity_embeddable_video\\Kernel\\Extension;\n+\n+use Drupal\\Component\\Annotation\\Plugin\\Discovery\\AnnotatedClassDiscovery;\n+use Drupal\\KernelTests\\KernelTestBase;\n+use Drupal\\media_entity_embeddable_video\\Plugin\\MediaEntity\\VideoProvider\\YouTube;\n+use Symfony\\Component\\DependencyInjection\\ContainerBuilder;\n+use Drupal\\media_entity_embeddable_video\\Plugin\\Validation\\Constraint\\VideoProviderMatchConstraint;\n+use Drupal\\media_entity_embeddable_video\\Plugin\\Validation\\Constraint\\VideoProviderMatchConstraintValidator;\n+\n+/**\n+ * Tests media_entity_embeddable_video constraints.\n+ *\n+ * @group media_entity\n+ */\n+class VideoProviderMatchConstraintTest extends KernelTestBase {\n+\n+  /**\n+   * Modules to enable.\n+   *\n+   * @var array\n+   */\n+  public static $modules = ['system', 'media_entity', 'media_entity_embeddable_video'];\n+\n+  /**\n+   * An array of regexes.\n+   *\n+   * @var array\n+   */\n+  public $regexes;\n+\n+  /**\n+   * {@inheritdoc}\n+   */\n+  protected function setUp() {\n+    parent::setUp();\n+\n+    // Get available regexes.\n+    $regexes = [];\n+    $video_providers = $this->container->get('plugin.manager.media_entity_embeddable_video.provider');\n+    foreach ($video_providers->getDefinitions() as $definition) {\n+      $regexes = array_merge($regexes, $definition['regular_expressions']);\n+    }\n+    $this->regexes = $regexes;\n+  }\n+\n+\n+  /**\n+   * Tests TweetEmbedCode constraint.","path":"src/Kernel/Extension/VideoProviderMatchConstraintTest.php","position":55,"original_position":55,"commit_id":"9270e20cfe21daa5b8cfed1308472a19c5b3ae8b","original_commit_id":"9270e20cfe21daa5b8cfed1308472a19c5b3ae8b","user":{"login":"slashrsm","id":376889,"avatar_url":"https://avatars.githubusercontent.com/u/376889?v=3","gravatar_id":"","url":"https://api.github.com/users/slashrsm","html_url":"https://github.com/slashrsm","followers_url":"https://api.github.com/users/slashrsm/followers","following_url":"https://api.github.com/users/slashrsm/following{/other_user}","gists_url":"https://api.github.com/users/slashrsm/gists{/gist_id}","starred_url":"https://api.github.com/users/slashrsm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slashrsm/subscriptions","organizations_url":"https://api.github.com/users/slashrsm/orgs","repos_url":"https://api.github.com/users/slashrsm/repos","events_url":"https://api.github.com/users/slashrsm/events{/privacy}","received_events_url":"https://api.github.com/users/slashrsm/received_events","type":"User","site_admin":false},"body":"Tweet (copy-paste I assume).","created_at":"2015-10-20T16:28:40Z","updated_at":"2015-10-20T16:28:40Z","html_url":"https://github.com/drupal-media/media_entity_embeddable_video/pull/8#discussion_r42518929","pull_request_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/pulls/comments/42518929"},"html":{"href":"https://github.com/drupal-media/media_entity_embeddable_video/pull/8#discussion_r42518929"},"pull_request":{"href":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/pulls/8","id":47934262,"html_url":"https://github.com/drupal-media/media_entity_embeddable_video/pull/8","diff_url":"https://github.com/drupal-media/media_entity_embeddable_video/pull/8.diff","patch_url":"https://github.com/drupal-media/media_entity_embeddable_video/pull/8.patch","issue_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/issues/8","number":8,"state":"open","locked":false,"title":"Issue #2578947 by Primsi: [Chase media_entity] Convert validation to …","user":{"login":"primsi","id":5868171,"avatar_url":"https://avatars.githubusercontent.com/u/5868171?v=3","gravatar_id":"","url":"https://api.github.com/users/primsi","html_url":"https://github.com/primsi","followers_url":"https://api.github.com/users/primsi/followers","following_url":"https://api.github.com/users/primsi/following{/other_user}","gists_url":"https://api.github.com/users/primsi/gists{/gist_id}","starred_url":"https://api.github.com/users/primsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/primsi/subscriptions","organizations_url":"https://api.github.com/users/primsi/orgs","repos_url":"https://api.github.com/users/primsi/repos","events_url":"https://api.github.com/users/primsi/events{/privacy}","received_events_url":"https://api.github.com/users/primsi/received_events","type":"User","site_admin":false},"body":"…Constraints API","created_at":"2015-10-16T16:53:33Z","updated_at":"2015-10-20T16:28:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f096e5332a788d6b7b10c0c9198136f365958af7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/pulls/8/commits","review_comments_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/pulls/8/comments","review_comment_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/pulls/comments{/number}","comments_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/issues/8/comments","statuses_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/statuses/9270e20cfe21daa5b8cfed1308472a19c5b3ae8b","head":{"label":"primsi:2578947_constraints","ref":"2578947_constraints","sha":"9270e20cfe21daa5b8cfed1308472a19c5b3ae8b","user":{"login":"primsi","id":5868171,"avatar_url":"https://avatars.githubusercontent.com/u/5868171?v=3","gravatar_id":"","url":"https://api.github.com/users/primsi","html_url":"https://github.com/primsi","followers_url":"https://api.github.com/users/primsi/followers","following_url":"https://api.github.com/users/primsi/following{/other_user}","gists_url":"https://api.github.com/users/primsi/gists{/gist_id}","starred_url":"https://api.github.com/users/primsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/primsi/subscriptions","organizations_url":"https://api.github.com/users/primsi/orgs","repos_url":"https://api.github.com/users/primsi/repos","events_url":"https://api.github.com/users/primsi/events{/privacy}","received_events_url":"https://api.github.com/users/primsi/received_events","type":"User","site_admin":false},"repo":{"id":44398533,"name":"media_entity_embeddable_video","full_name":"primsi/media_entity_embeddable_video","owner":{"login":"primsi","id":5868171,"avatar_url":"https://avatars.githubusercontent.com/u/5868171?v=3","gravatar_id":"","url":"https://api.github.com/users/primsi","html_url":"https://github.com/primsi","followers_url":"https://api.github.com/users/primsi/followers","following_url":"https://api.github.com/users/primsi/following{/other_user}","gists_url":"https://api.github.com/users/primsi/gists{/gist_id}","starred_url":"https://api.github.com/users/primsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/primsi/subscriptions","organizations_url":"https://api.github.com/users/primsi/orgs","repos_url":"https://api.github.com/users/primsi/repos","events_url":"https://api.github.com/users/primsi/events{/privacy}","received_events_url":"https://api.github.com/users/primsi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/primsi/media_entity_embeddable_video","description":"Embeddable video integration for media entity.","fork":true,"url":"https://api.github.com/repos/primsi/media_entity_embeddable_video","forks_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/forks","keys_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/keys{/key_id}","collaborators_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/teams","hooks_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/hooks","issue_events_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/issues/events{/number}","events_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/events","assignees_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/assignees{/user}","branches_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/branches{/branch}","tags_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/tags","blobs_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/git/refs{/sha}","trees_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/git/trees{/sha}","statuses_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/statuses/{sha}","languages_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/languages","stargazers_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/stargazers","contributors_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/contributors","subscribers_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/subscribers","subscription_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/subscription","commits_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/commits{/sha}","git_commits_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/git/commits{/sha}","comments_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/comments{/number}","issue_comment_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/issues/comments{/number}","contents_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/contents/{+path}","compare_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/compare/{base}...{head}","merges_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/merges","archive_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/downloads","issues_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/issues{/number}","pulls_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/pulls{/number}","milestones_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/milestones{/number}","notifications_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/labels{/name}","releases_url":"https://api.github.com/repos/primsi/media_entity_embeddable_video/releases{/id}","created_at":"2015-10-16T16:50:49Z","updated_at":"2015-10-16T16:50:50Z","pushed_at":"2015-10-20T15:40:00Z","git_url":"git://github.com/primsi/media_entity_embeddable_video.git","ssh_url":"git@github.com:primsi/media_entity_embeddable_video.git","clone_url":"https://github.com/primsi/media_entity_embeddable_video.git","svn_url":"https://github.com/primsi/media_entity_embeddable_video","homepage":null,"size":226,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"8.x-1.x"}},"base":{"label":"drupal-media:8.x-1.x","ref":"8.x-1.x","sha":"9c5146be906edc2437deb032409e25ef85e4332a","user":{"login":"drupal-media","id":7276699,"avatar_url":"https://avatars.githubusercontent.com/u/7276699?v=3","gravatar_id":"","url":"https://api.github.com/users/drupal-media","html_url":"https://github.com/drupal-media","followers_url":"https://api.github.com/users/drupal-media/followers","following_url":"https://api.github.com/users/drupal-media/following{/other_user}","gists_url":"https://api.github.com/users/drupal-media/gists{/gist_id}","starred_url":"https://api.github.com/users/drupal-media/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drupal-media/subscriptions","organizations_url":"https://api.github.com/users/drupal-media/orgs","repos_url":"https://api.github.com/users/drupal-media/repos","events_url":"https://api.github.com/users/drupal-media/events{/privacy}","received_events_url":"https://api.github.com/users/drupal-media/received_events","type":"Organization","site_admin":false},"repo":{"id":30354108,"name":"media_entity_embeddable_video","full_name":"drupal-media/media_entity_embeddable_video","owner":{"login":"drupal-media","id":7276699,"avatar_url":"https://avatars.githubusercontent.com/u/7276699?v=3","gravatar_id":"","url":"https://api.github.com/users/drupal-media","html_url":"https://github.com/drupal-media","followers_url":"https://api.github.com/users/drupal-media/followers","following_url":"https://api.github.com/users/drupal-media/following{/other_user}","gists_url":"https://api.github.com/users/drupal-media/gists{/gist_id}","starred_url":"https://api.github.com/users/drupal-media/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drupal-media/subscriptions","organizations_url":"https://api.github.com/users/drupal-media/orgs","repos_url":"https://api.github.com/users/drupal-media/repos","events_url":"https://api.github.com/users/drupal-media/events{/privacy}","received_events_url":"https://api.github.com/users/drupal-media/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/drupal-media/media_entity_embeddable_video","description":"Embeddable video integration for media entity.","fork":false,"url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video","forks_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/forks","keys_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/teams","hooks_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/hooks","issue_events_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/issues/events{/number}","events_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/events","assignees_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/assignees{/user}","branches_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/branches{/branch}","tags_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/tags","blobs_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/git/refs{/sha}","trees_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/statuses/{sha}","languages_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/languages","stargazers_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/stargazers","contributors_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/contributors","subscribers_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/subscribers","subscription_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/subscription","commits_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/commits{/sha}","git_commits_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/git/commits{/sha}","comments_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/comments{/number}","issue_comment_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/issues/comments{/number}","contents_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/contents/{+path}","compare_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/merges","archive_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/downloads","issues_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/issues{/number}","pulls_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/pulls{/number}","milestones_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/milestones{/number}","notifications_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/labels{/name}","releases_url":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/releases{/id}","created_at":"2015-02-05T12:22:00Z","updated_at":"2015-10-16T15:10:45Z","pushed_at":"2015-10-20T15:40:01Z","git_url":"git://github.com/drupal-media/media_entity_embeddable_video.git","ssh_url":"git@github.com:drupal-media/media_entity_embeddable_video.git","clone_url":"https://github.com/drupal-media/media_entity_embeddable_video.git","svn_url":"https://github.com/drupal-media/media_entity_embeddable_video","homepage":null,"size":226,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":2,"forks":5,"open_issues":2,"watchers":1,"default_branch":"8.x-1.x"}},"_links":{"self":{"href":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/pulls/8"},"html":{"href":"https://github.com/drupal-media/media_entity_embeddable_video/pull/8"},"issue":{"href":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/issues/8"},"comments":{"href":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/drupal-media/media_entity_embeddable_video/statuses/9270e20cfe21daa5b8cfed1308472a19c5b3ae8b"}}}}