{"action":"created","comment":{"url":"https://api.github.com/repos/drupol/libraries_cdn/pulls/comments/37567913","id":37567913,"diff_hunk":"@@ -0,0 +1,50 @@\n+<?php\n+\n+/**\n+ * @file\n+ * Contains \\Drupal\\Tests\\Libraries_cdn\\Plugin\\LibrariesCDN\\cdnjsTest.\n+ */\n+\n+namespace Drupal\\Tests\\libraries_cdn\\Plugin\\LibrariesCDN;\n+use Drupal\\libraries_cdn\\Plugin\\LibrariesCDN\\CDNJS;\n+use Drupal\\libraries_cdn\\Type\\CDNBaseInterface;\n+use Drupal\\service_container\\Legacy\\Drupal7;\n+\n+/**\n+ * @coversDefaultClass \\Drupal\\libraries_cdn\\Plugin\\LibrariesCDN\\cdnjs\n+ */\n+class cdnjsTest extends \\PHPUnit_Framework_TestCase {\n+\n+  /* @var CDNBaseInterface $this->plugin */\n+  protected $plugin;\n+\n+  /**\n+   * {@inheritdoc}\n+   */\n+  protected function setUp() {\n+    parent::setUp();\n+\n+    $drupal7 = \\Mockery::mock('\\Drupal\\service_container\\Legacy\\Drupal7');\n+    $this->plugin = new CDNJS(array(), 'cdnjs', array(), $drupal7);\n+  }\n+\n+  /**\n+   * @covers ::setLibrary()\n+   * @covers ::getLibrary()\n+   */\n+  public function test_setgetLibrary() {\n+    $this->plugin->setLibrary('jquery');\n+    $this->assertEquals('jquery', $this->plugin->getLibrary());\n+  }\n+\n+  /**\n+   * @covers ::isAvailable()\n+   */\n+  public function test_isAvailable() {\n+    $this->plugin->setLibrary('jquery');","path":"tests/src/Plugin/LibrariesCDN/cdnjsTest.php","position":null,"original_position":44,"commit_id":"a883b1666e9eda313f45d6989fd246efce01eb00","original_commit_id":"e5c40b05a9ec8e4467b842f8b775ea52cb5d2028","user":{"login":"LionsAd","id":354804,"avatar_url":"https://avatars.githubusercontent.com/u/354804?v=3","gravatar_id":"","url":"https://api.github.com/users/LionsAd","html_url":"https://github.com/LionsAd","followers_url":"https://api.github.com/users/LionsAd/followers","following_url":"https://api.github.com/users/LionsAd/following{/other_user}","gists_url":"https://api.github.com/users/LionsAd/gists{/gist_id}","starred_url":"https://api.github.com/users/LionsAd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LionsAd/subscriptions","organizations_url":"https://api.github.com/users/LionsAd/orgs","repos_url":"https://api.github.com/users/LionsAd/repos","events_url":"https://api.github.com/users/LionsAd/events{/privacy}","received_events_url":"https://api.github.com/users/LionsAd/received_events","type":"User","site_admin":false},"body":"The same here, but with different rules:\r\n\r\n$this->drupal7->shouldReceive('drupal_http_request')->once()->with(...)->andReturn(...);\r\n","created_at":"2015-08-20T18:58:39Z","updated_at":"2015-08-20T18:58:39Z","html_url":"https://github.com/drupol/libraries_cdn/pull/2#discussion_r37567913","pull_request_url":"https://api.github.com/repos/drupol/libraries_cdn/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/drupol/libraries_cdn/pulls/comments/37567913"},"html":{"href":"https://github.com/drupol/libraries_cdn/pull/2#discussion_r37567913"},"pull_request":{"href":"https://api.github.com/repos/drupol/libraries_cdn/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/drupol/libraries_cdn/pulls/2","id":42964272,"html_url":"https://github.com/drupol/libraries_cdn/pull/2","diff_url":"https://github.com/drupol/libraries_cdn/pull/2.diff","patch_url":"https://github.com/drupol/libraries_cdn/pull/2.patch","issue_url":"https://api.github.com/repos/drupol/libraries_cdn/issues/2","number":2,"state":"open","locked":false,"title":"Adding PHPUnit tests.","user":{"login":"drupol","id":252042,"avatar_url":"https://avatars.githubusercontent.com/u/252042?v=3","gravatar_id":"","url":"https://api.github.com/users/drupol","html_url":"https://github.com/drupol","followers_url":"https://api.github.com/users/drupol/followers","following_url":"https://api.github.com/users/drupol/following{/other_user}","gists_url":"https://api.github.com/users/drupol/gists{/gist_id}","starred_url":"https://api.github.com/users/drupol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drupol/subscriptions","organizations_url":"https://api.github.com/users/drupol/orgs","repos_url":"https://api.github.com/users/drupol/repos","events_url":"https://api.github.com/users/drupol/events{/privacy}","received_events_url":"https://api.github.com/users/drupol/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-20T18:50:29Z","updated_at":"2015-08-20T18:58:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36950fbbdd574fec59550e1016b819000c7a19c1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/drupol/libraries_cdn/pulls/2/commits","review_comments_url":"https://api.github.com/repos/drupol/libraries_cdn/pulls/2/comments","review_comment_url":"https://api.github.com/repos/drupol/libraries_cdn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/drupol/libraries_cdn/issues/2/comments","statuses_url":"https://api.github.com/repos/drupol/libraries_cdn/statuses/a883b1666e9eda313f45d6989fd246efce01eb00","head":{"label":"drupol:phpunit-tests","ref":"phpunit-tests","sha":"a883b1666e9eda313f45d6989fd246efce01eb00","user":{"login":"drupol","id":252042,"avatar_url":"https://avatars.githubusercontent.com/u/252042?v=3","gravatar_id":"","url":"https://api.github.com/users/drupol","html_url":"https://github.com/drupol","followers_url":"https://api.github.com/users/drupol/followers","following_url":"https://api.github.com/users/drupol/following{/other_user}","gists_url":"https://api.github.com/users/drupol/gists{/gist_id}","starred_url":"https://api.github.com/users/drupol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drupol/subscriptions","organizations_url":"https://api.github.com/users/drupol/orgs","repos_url":"https://api.github.com/users/drupol/repos","events_url":"https://api.github.com/users/drupol/events{/privacy}","received_events_url":"https://api.github.com/users/drupol/received_events","type":"User","site_admin":false},"repo":{"id":40590805,"name":"libraries_cdn","full_name":"drupol/libraries_cdn","owner":{"login":"drupol","id":252042,"avatar_url":"https://avatars.githubusercontent.com/u/252042?v=3","gravatar_id":"","url":"https://api.github.com/users/drupol","html_url":"https://github.com/drupol","followers_url":"https://api.github.com/users/drupol/followers","following_url":"https://api.github.com/users/drupol/following{/other_user}","gists_url":"https://api.github.com/users/drupol/gists{/gist_id}","starred_url":"https://api.github.com/users/drupol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drupol/subscriptions","organizations_url":"https://api.github.com/users/drupol/orgs","repos_url":"https://api.github.com/users/drupol/repos","events_url":"https://api.github.com/users/drupol/events{/privacy}","received_events_url":"https://api.github.com/users/drupol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/drupol/libraries_cdn","description":"Libraries CDN API module","fork":false,"url":"https://api.github.com/repos/drupol/libraries_cdn","forks_url":"https://api.github.com/repos/drupol/libraries_cdn/forks","keys_url":"https://api.github.com/repos/drupol/libraries_cdn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drupol/libraries_cdn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drupol/libraries_cdn/teams","hooks_url":"https://api.github.com/repos/drupol/libraries_cdn/hooks","issue_events_url":"https://api.github.com/repos/drupol/libraries_cdn/issues/events{/number}","events_url":"https://api.github.com/repos/drupol/libraries_cdn/events","assignees_url":"https://api.github.com/repos/drupol/libraries_cdn/assignees{/user}","branches_url":"https://api.github.com/repos/drupol/libraries_cdn/branches{/branch}","tags_url":"https://api.github.com/repos/drupol/libraries_cdn/tags","blobs_url":"https://api.github.com/repos/drupol/libraries_cdn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drupol/libraries_cdn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drupol/libraries_cdn/git/refs{/sha}","trees_url":"https://api.github.com/repos/drupol/libraries_cdn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drupol/libraries_cdn/statuses/{sha}","languages_url":"https://api.github.com/repos/drupol/libraries_cdn/languages","stargazers_url":"https://api.github.com/repos/drupol/libraries_cdn/stargazers","contributors_url":"https://api.github.com/repos/drupol/libraries_cdn/contributors","subscribers_url":"https://api.github.com/repos/drupol/libraries_cdn/subscribers","subscription_url":"https://api.github.com/repos/drupol/libraries_cdn/subscription","commits_url":"https://api.github.com/repos/drupol/libraries_cdn/commits{/sha}","git_commits_url":"https://api.github.com/repos/drupol/libraries_cdn/git/commits{/sha}","comments_url":"https://api.github.com/repos/drupol/libraries_cdn/comments{/number}","issue_comment_url":"https://api.github.com/repos/drupol/libraries_cdn/issues/comments{/number}","contents_url":"https://api.github.com/repos/drupol/libraries_cdn/contents/{+path}","compare_url":"https://api.github.com/repos/drupol/libraries_cdn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drupol/libraries_cdn/merges","archive_url":"https://api.github.com/repos/drupol/libraries_cdn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drupol/libraries_cdn/downloads","issues_url":"https://api.github.com/repos/drupol/libraries_cdn/issues{/number}","pulls_url":"https://api.github.com/repos/drupol/libraries_cdn/pulls{/number}","milestones_url":"https://api.github.com/repos/drupol/libraries_cdn/milestones{/number}","notifications_url":"https://api.github.com/repos/drupol/libraries_cdn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drupol/libraries_cdn/labels{/name}","releases_url":"https://api.github.com/repos/drupol/libraries_cdn/releases{/id}","created_at":"2015-08-12T09:00:29Z","updated_at":"2015-08-12T11:51:14Z","pushed_at":"2015-08-20T18:57:35Z","git_url":"git://github.com/drupol/libraries_cdn.git","ssh_url":"git@github.com:drupol/libraries_cdn.git","clone_url":"https://github.com/drupol/libraries_cdn.git","svn_url":"https://github.com/drupol/libraries_cdn","homepage":null,"size":169,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"7.x-1.x"}},"base":{"label":"drupol:7.x-1.x","ref":"7.x-1.x","sha":"9e04f9d44350f9854e95950dfe6ee8dacd576514","user":{"login":"drupol","id":252042,"avatar_url":"https://avatars.githubusercontent.com/u/252042?v=3","gravatar_id":"","url":"https://api.github.com/users/drupol","html_url":"https://github.com/drupol","followers_url":"https://api.github.com/users/drupol/followers","following_url":"https://api.github.com/users/drupol/following{/other_user}","gists_url":"https://api.github.com/users/drupol/gists{/gist_id}","starred_url":"https://api.github.com/users/drupol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drupol/subscriptions","organizations_url":"https://api.github.com/users/drupol/orgs","repos_url":"https://api.github.com/users/drupol/repos","events_url":"https://api.github.com/users/drupol/events{/privacy}","received_events_url":"https://api.github.com/users/drupol/received_events","type":"User","site_admin":false},"repo":{"id":40590805,"name":"libraries_cdn","full_name":"drupol/libraries_cdn","owner":{"login":"drupol","id":252042,"avatar_url":"https://avatars.githubusercontent.com/u/252042?v=3","gravatar_id":"","url":"https://api.github.com/users/drupol","html_url":"https://github.com/drupol","followers_url":"https://api.github.com/users/drupol/followers","following_url":"https://api.github.com/users/drupol/following{/other_user}","gists_url":"https://api.github.com/users/drupol/gists{/gist_id}","starred_url":"https://api.github.com/users/drupol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drupol/subscriptions","organizations_url":"https://api.github.com/users/drupol/orgs","repos_url":"https://api.github.com/users/drupol/repos","events_url":"https://api.github.com/users/drupol/events{/privacy}","received_events_url":"https://api.github.com/users/drupol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/drupol/libraries_cdn","description":"Libraries CDN API module","fork":false,"url":"https://api.github.com/repos/drupol/libraries_cdn","forks_url":"https://api.github.com/repos/drupol/libraries_cdn/forks","keys_url":"https://api.github.com/repos/drupol/libraries_cdn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drupol/libraries_cdn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drupol/libraries_cdn/teams","hooks_url":"https://api.github.com/repos/drupol/libraries_cdn/hooks","issue_events_url":"https://api.github.com/repos/drupol/libraries_cdn/issues/events{/number}","events_url":"https://api.github.com/repos/drupol/libraries_cdn/events","assignees_url":"https://api.github.com/repos/drupol/libraries_cdn/assignees{/user}","branches_url":"https://api.github.com/repos/drupol/libraries_cdn/branches{/branch}","tags_url":"https://api.github.com/repos/drupol/libraries_cdn/tags","blobs_url":"https://api.github.com/repos/drupol/libraries_cdn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drupol/libraries_cdn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drupol/libraries_cdn/git/refs{/sha}","trees_url":"https://api.github.com/repos/drupol/libraries_cdn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drupol/libraries_cdn/statuses/{sha}","languages_url":"https://api.github.com/repos/drupol/libraries_cdn/languages","stargazers_url":"https://api.github.com/repos/drupol/libraries_cdn/stargazers","contributors_url":"https://api.github.com/repos/drupol/libraries_cdn/contributors","subscribers_url":"https://api.github.com/repos/drupol/libraries_cdn/subscribers","subscription_url":"https://api.github.com/repos/drupol/libraries_cdn/subscription","commits_url":"https://api.github.com/repos/drupol/libraries_cdn/commits{/sha}","git_commits_url":"https://api.github.com/repos/drupol/libraries_cdn/git/commits{/sha}","comments_url":"https://api.github.com/repos/drupol/libraries_cdn/comments{/number}","issue_comment_url":"https://api.github.com/repos/drupol/libraries_cdn/issues/comments{/number}","contents_url":"https://api.github.com/repos/drupol/libraries_cdn/contents/{+path}","compare_url":"https://api.github.com/repos/drupol/libraries_cdn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drupol/libraries_cdn/merges","archive_url":"https://api.github.com/repos/drupol/libraries_cdn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drupol/libraries_cdn/downloads","issues_url":"https://api.github.com/repos/drupol/libraries_cdn/issues{/number}","pulls_url":"https://api.github.com/repos/drupol/libraries_cdn/pulls{/number}","milestones_url":"https://api.github.com/repos/drupol/libraries_cdn/milestones{/number}","notifications_url":"https://api.github.com/repos/drupol/libraries_cdn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drupol/libraries_cdn/labels{/name}","releases_url":"https://api.github.com/repos/drupol/libraries_cdn/releases{/id}","created_at":"2015-08-12T09:00:29Z","updated_at":"2015-08-12T11:51:14Z","pushed_at":"2015-08-20T18:57:35Z","git_url":"git://github.com/drupol/libraries_cdn.git","ssh_url":"git@github.com:drupol/libraries_cdn.git","clone_url":"https://github.com/drupol/libraries_cdn.git","svn_url":"https://github.com/drupol/libraries_cdn","homepage":null,"size":169,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"7.x-1.x"}},"_links":{"self":{"href":"https://api.github.com/repos/drupol/libraries_cdn/pulls/2"},"html":{"href":"https://github.com/drupol/libraries_cdn/pull/2"},"issue":{"href":"https://api.github.com/repos/drupol/libraries_cdn/issues/2"},"comments":{"href":"https://api.github.com/repos/drupol/libraries_cdn/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/drupol/libraries_cdn/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/drupol/libraries_cdn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/drupol/libraries_cdn/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/drupol/libraries_cdn/statuses/a883b1666e9eda313f45d6989fd246efce01eb00"}}}}