{"action":"created","comment":{"url":"https://api.github.com/repos/treehouselabs/BehatCommon/pulls/comments/34557671","id":34557671,"diff_hunk":"@@ -0,0 +1,268 @@\n+<?php\n+\n+namespace TreeHouse\\BehatCommon;\n+\n+use Behat\\Gherkin\\Node\\TableNode;\n+use Behat\\Symfony2Extension\\Context\\KernelAwareContext;\n+use Doctrine\\Common\\DataFixtures\\Purger\\ORMPurger;\n+use Doctrine\\Common\\Util\\Inflector;\n+use Doctrine\\ORM\\EntityManagerInterface;\n+use Doctrine\\ORM\\EntityRepository;\n+use PHPUnit_Framework_Assert as Assert;\n+\n+abstract class AbstractDoctrineOrmContext extends AbstractPersistanceContext implements KernelAwareContext\n+{\n+    use KernelAwareTrait;\n+\n+    /**\n+     * @var EntityManagerInterface\n+     */\n+    private $entityManager;\n+\n+    /**\n+     * @var string\n+     */\n+    private $defaultPrefix;\n+\n+    /**\n+     * @param EntityManagerInterface|null $entity_manager\n+     * @param string                      $default_prefix\n+     */\n+    public function __construct(\n+        EntityManagerInterface $entity_manager = null,\n+        $default_prefix = 'AppBundle'\n+    ) {\n+        $this->entityManager = $entity_manager;\n+        $this->defaultPrefix = $default_prefix;\n+    }\n+\n+    /**\n+     * @Given /^the following ((?!.*should).*) exist(s)?:$/\n+     *\n+     * {@inheritdoc}\n+     */\n+    public function theFollowingDataShouldBePersisted($name, TableNode $table)\n+    {\n+        $alias = $this->convertNameToAlias($this->singularifyName($name));\n+\n+        $this->persistRows($alias, $table->getHash());\n+    }\n+\n+    /**\n+     * @Then /^the following (.*?) should( still)? exist(s)?:$/\n+     *\n+     * {@inheritdoc}\n+     */\n+    public function theFollowingDataShouldHaveBeenPersisted($name, TableNode $table)\n+    {\n+        $alias = $this->convertNameToAlias($this->singularifyName($name));\n+\n+        $this->assertRowsHaveBeenPersisted($alias, $table->getHash());\n+    }\n+\n+    /**\n+     * @Then /^the following (.*?) should NOT exist:$/\n+     *\n+     * {@inheritdoc}\n+     */\n+    public function theFollowingDataShouldNotHaveBeenPersisted($name, TableNode $table)\n+    {\n+        $alias = $this->convertNameToAlias($this->singularifyName($name));\n+\n+        $this->assertRowsHaveNotBeenPersisted($alias, $table->getHash());\n+    }\n+\n+    /**\n+     * @BeforeScenario\n+     */\n+    public function purgeDatabase()","path":"src/TreeHouse/BehatCommon/AbstractDoctrineOrmContext.php","position":78,"original_position":78,"commit_id":"b0b9b64bc9076d4bad999925750cd158964645fc","original_commit_id":"b0b9b64bc9076d4bad999925750cd158964645fc","user":{"login":"cleentfaar","id":795661,"avatar_url":"https://avatars.githubusercontent.com/u/795661?v=3","gravatar_id":"","url":"https://api.github.com/users/cleentfaar","html_url":"https://github.com/cleentfaar","followers_url":"https://api.github.com/users/cleentfaar/followers","following_url":"https://api.github.com/users/cleentfaar/following{/other_user}","gists_url":"https://api.github.com/users/cleentfaar/gists{/gist_id}","starred_url":"https://api.github.com/users/cleentfaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleentfaar/subscriptions","organizations_url":"https://api.github.com/users/cleentfaar/orgs","repos_url":"https://api.github.com/users/cleentfaar/repos","events_url":"https://api.github.com/users/cleentfaar/events{/privacy}","received_events_url":"https://api.github.com/users/cleentfaar/received_events","type":"User","site_admin":false},"body":"Mogelijkheid om met tag aan/uit te zetten","created_at":"2015-07-14T11:15:32Z","updated_at":"2015-07-14T11:15:32Z","html_url":"https://github.com/treehouselabs/BehatCommon/pull/1#discussion_r34557671","pull_request_url":"https://api.github.com/repos/treehouselabs/BehatCommon/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/treehouselabs/BehatCommon/pulls/comments/34557671"},"html":{"href":"https://github.com/treehouselabs/BehatCommon/pull/1#discussion_r34557671"},"pull_request":{"href":"https://api.github.com/repos/treehouselabs/BehatCommon/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/treehouselabs/BehatCommon/pulls/1","id":39901051,"html_url":"https://github.com/treehouselabs/BehatCommon/pull/1","diff_url":"https://github.com/treehouselabs/BehatCommon/pull/1.diff","patch_url":"https://github.com/treehouselabs/BehatCommon/pull/1.patch","issue_url":"https://api.github.com/repos/treehouselabs/BehatCommon/issues/1","number":1,"state":"open","locked":false,"title":"Initial code","user":{"login":"cleentfaar","id":795661,"avatar_url":"https://avatars.githubusercontent.com/u/795661?v=3","gravatar_id":"","url":"https://api.github.com/users/cleentfaar","html_url":"https://github.com/cleentfaar","followers_url":"https://api.github.com/users/cleentfaar/followers","following_url":"https://api.github.com/users/cleentfaar/following{/other_user}","gists_url":"https://api.github.com/users/cleentfaar/gists{/gist_id}","starred_url":"https://api.github.com/users/cleentfaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleentfaar/subscriptions","organizations_url":"https://api.github.com/users/cleentfaar/orgs","repos_url":"https://api.github.com/users/cleentfaar/repos","events_url":"https://api.github.com/users/cleentfaar/events{/privacy}","received_events_url":"https://api.github.com/users/cleentfaar/received_events","type":"User","site_admin":false},"body":"Moved code from HW to here","created_at":"2015-07-14T10:15:37Z","updated_at":"2015-07-14T11:15:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6509412c5cd3929dd0281c6f2ac1caa5a192bcbf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/treehouselabs/BehatCommon/pulls/1/commits","review_comments_url":"https://api.github.com/repos/treehouselabs/BehatCommon/pulls/1/comments","review_comment_url":"https://api.github.com/repos/treehouselabs/BehatCommon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/treehouselabs/BehatCommon/issues/1/comments","statuses_url":"https://api.github.com/repos/treehouselabs/BehatCommon/statuses/b0b9b64bc9076d4bad999925750cd158964645fc","head":{"label":"cleentfaar:initial-code","ref":"initial-code","sha":"b0b9b64bc9076d4bad999925750cd158964645fc","user":{"login":"cleentfaar","id":795661,"avatar_url":"https://avatars.githubusercontent.com/u/795661?v=3","gravatar_id":"","url":"https://api.github.com/users/cleentfaar","html_url":"https://github.com/cleentfaar","followers_url":"https://api.github.com/users/cleentfaar/followers","following_url":"https://api.github.com/users/cleentfaar/following{/other_user}","gists_url":"https://api.github.com/users/cleentfaar/gists{/gist_id}","starred_url":"https://api.github.com/users/cleentfaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleentfaar/subscriptions","organizations_url":"https://api.github.com/users/cleentfaar/orgs","repos_url":"https://api.github.com/users/cleentfaar/repos","events_url":"https://api.github.com/users/cleentfaar/events{/privacy}","received_events_url":"https://api.github.com/users/cleentfaar/received_events","type":"User","site_admin":false},"repo":{"id":39067024,"name":"BehatCommon","full_name":"cleentfaar/BehatCommon","owner":{"login":"cleentfaar","id":795661,"avatar_url":"https://avatars.githubusercontent.com/u/795661?v=3","gravatar_id":"","url":"https://api.github.com/users/cleentfaar","html_url":"https://github.com/cleentfaar","followers_url":"https://api.github.com/users/cleentfaar/followers","following_url":"https://api.github.com/users/cleentfaar/following{/other_user}","gists_url":"https://api.github.com/users/cleentfaar/gists{/gist_id}","starred_url":"https://api.github.com/users/cleentfaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cleentfaar/subscriptions","organizations_url":"https://api.github.com/users/cleentfaar/orgs","repos_url":"https://api.github.com/users/cleentfaar/repos","events_url":"https://api.github.com/users/cleentfaar/events{/privacy}","received_events_url":"https://api.github.com/users/cleentfaar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cleentfaar/BehatCommon","description":"Commonly used Behat testing featurs, contexts, etc.","fork":true,"url":"https://api.github.com/repos/cleentfaar/BehatCommon","forks_url":"https://api.github.com/repos/cleentfaar/BehatCommon/forks","keys_url":"https://api.github.com/repos/cleentfaar/BehatCommon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cleentfaar/BehatCommon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cleentfaar/BehatCommon/teams","hooks_url":"https://api.github.com/repos/cleentfaar/BehatCommon/hooks","issue_events_url":"https://api.github.com/repos/cleentfaar/BehatCommon/issues/events{/number}","events_url":"https://api.github.com/repos/cleentfaar/BehatCommon/events","assignees_url":"https://api.github.com/repos/cleentfaar/BehatCommon/assignees{/user}","branches_url":"https://api.github.com/repos/cleentfaar/BehatCommon/branches{/branch}","tags_url":"https://api.github.com/repos/cleentfaar/BehatCommon/tags","blobs_url":"https://api.github.com/repos/cleentfaar/BehatCommon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cleentfaar/BehatCommon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cleentfaar/BehatCommon/git/refs{/sha}","trees_url":"https://api.github.com/repos/cleentfaar/BehatCommon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cleentfaar/BehatCommon/statuses/{sha}","languages_url":"https://api.github.com/repos/cleentfaar/BehatCommon/languages","stargazers_url":"https://api.github.com/repos/cleentfaar/BehatCommon/stargazers","contributors_url":"https://api.github.com/repos/cleentfaar/BehatCommon/contributors","subscribers_url":"https://api.github.com/repos/cleentfaar/BehatCommon/subscribers","subscription_url":"https://api.github.com/repos/cleentfaar/BehatCommon/subscription","commits_url":"https://api.github.com/repos/cleentfaar/BehatCommon/commits{/sha}","git_commits_url":"https://api.github.com/repos/cleentfaar/BehatCommon/git/commits{/sha}","comments_url":"https://api.github.com/repos/cleentfaar/BehatCommon/comments{/number}","issue_comment_url":"https://api.github.com/repos/cleentfaar/BehatCommon/issues/comments{/number}","contents_url":"https://api.github.com/repos/cleentfaar/BehatCommon/contents/{+path}","compare_url":"https://api.github.com/repos/cleentfaar/BehatCommon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cleentfaar/BehatCommon/merges","archive_url":"https://api.github.com/repos/cleentfaar/BehatCommon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cleentfaar/BehatCommon/downloads","issues_url":"https://api.github.com/repos/cleentfaar/BehatCommon/issues{/number}","pulls_url":"https://api.github.com/repos/cleentfaar/BehatCommon/pulls{/number}","milestones_url":"https://api.github.com/repos/cleentfaar/BehatCommon/milestones{/number}","notifications_url":"https://api.github.com/repos/cleentfaar/BehatCommon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cleentfaar/BehatCommon/labels{/name}","releases_url":"https://api.github.com/repos/cleentfaar/BehatCommon/releases{/id}","created_at":"2015-07-14T09:50:25Z","updated_at":"2015-07-14T09:35:47Z","pushed_at":"2015-07-14T10:21:13Z","git_url":"git://github.com/cleentfaar/BehatCommon.git","ssh_url":"git@github.com:cleentfaar/BehatCommon.git","clone_url":"https://github.com/cleentfaar/BehatCommon.git","svn_url":"https://github.com/cleentfaar/BehatCommon","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"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":"master"}},"base":{"label":"treehouselabs:master","ref":"master","sha":"08730da288c662373ad3a5b036d4fa04ffc57734","user":{"login":"treehouselabs","id":1055933,"avatar_url":"https://avatars.githubusercontent.com/u/1055933?v=3","gravatar_id":"","url":"https://api.github.com/users/treehouselabs","html_url":"https://github.com/treehouselabs","followers_url":"https://api.github.com/users/treehouselabs/followers","following_url":"https://api.github.com/users/treehouselabs/following{/other_user}","gists_url":"https://api.github.com/users/treehouselabs/gists{/gist_id}","starred_url":"https://api.github.com/users/treehouselabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treehouselabs/subscriptions","organizations_url":"https://api.github.com/users/treehouselabs/orgs","repos_url":"https://api.github.com/users/treehouselabs/repos","events_url":"https://api.github.com/users/treehouselabs/events{/privacy}","received_events_url":"https://api.github.com/users/treehouselabs/received_events","type":"Organization","site_admin":false},"repo":{"id":39066391,"name":"BehatCommon","full_name":"treehouselabs/BehatCommon","owner":{"login":"treehouselabs","id":1055933,"avatar_url":"https://avatars.githubusercontent.com/u/1055933?v=3","gravatar_id":"","url":"https://api.github.com/users/treehouselabs","html_url":"https://github.com/treehouselabs","followers_url":"https://api.github.com/users/treehouselabs/followers","following_url":"https://api.github.com/users/treehouselabs/following{/other_user}","gists_url":"https://api.github.com/users/treehouselabs/gists{/gist_id}","starred_url":"https://api.github.com/users/treehouselabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treehouselabs/subscriptions","organizations_url":"https://api.github.com/users/treehouselabs/orgs","repos_url":"https://api.github.com/users/treehouselabs/repos","events_url":"https://api.github.com/users/treehouselabs/events{/privacy}","received_events_url":"https://api.github.com/users/treehouselabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/treehouselabs/BehatCommon","description":"Commonly used Behat testing featurs, contexts, etc.","fork":false,"url":"https://api.github.com/repos/treehouselabs/BehatCommon","forks_url":"https://api.github.com/repos/treehouselabs/BehatCommon/forks","keys_url":"https://api.github.com/repos/treehouselabs/BehatCommon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/treehouselabs/BehatCommon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/treehouselabs/BehatCommon/teams","hooks_url":"https://api.github.com/repos/treehouselabs/BehatCommon/hooks","issue_events_url":"https://api.github.com/repos/treehouselabs/BehatCommon/issues/events{/number}","events_url":"https://api.github.com/repos/treehouselabs/BehatCommon/events","assignees_url":"https://api.github.com/repos/treehouselabs/BehatCommon/assignees{/user}","branches_url":"https://api.github.com/repos/treehouselabs/BehatCommon/branches{/branch}","tags_url":"https://api.github.com/repos/treehouselabs/BehatCommon/tags","blobs_url":"https://api.github.com/repos/treehouselabs/BehatCommon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/treehouselabs/BehatCommon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/treehouselabs/BehatCommon/git/refs{/sha}","trees_url":"https://api.github.com/repos/treehouselabs/BehatCommon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/treehouselabs/BehatCommon/statuses/{sha}","languages_url":"https://api.github.com/repos/treehouselabs/BehatCommon/languages","stargazers_url":"https://api.github.com/repos/treehouselabs/BehatCommon/stargazers","contributors_url":"https://api.github.com/repos/treehouselabs/BehatCommon/contributors","subscribers_url":"https://api.github.com/repos/treehouselabs/BehatCommon/subscribers","subscription_url":"https://api.github.com/repos/treehouselabs/BehatCommon/subscription","commits_url":"https://api.github.com/repos/treehouselabs/BehatCommon/commits{/sha}","git_commits_url":"https://api.github.com/repos/treehouselabs/BehatCommon/git/commits{/sha}","comments_url":"https://api.github.com/repos/treehouselabs/BehatCommon/comments{/number}","issue_comment_url":"https://api.github.com/repos/treehouselabs/BehatCommon/issues/comments{/number}","contents_url":"https://api.github.com/repos/treehouselabs/BehatCommon/contents/{+path}","compare_url":"https://api.github.com/repos/treehouselabs/BehatCommon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/treehouselabs/BehatCommon/merges","archive_url":"https://api.github.com/repos/treehouselabs/BehatCommon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/treehouselabs/BehatCommon/downloads","issues_url":"https://api.github.com/repos/treehouselabs/BehatCommon/issues{/number}","pulls_url":"https://api.github.com/repos/treehouselabs/BehatCommon/pulls{/number}","milestones_url":"https://api.github.com/repos/treehouselabs/BehatCommon/milestones{/number}","notifications_url":"https://api.github.com/repos/treehouselabs/BehatCommon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/treehouselabs/BehatCommon/labels{/name}","releases_url":"https://api.github.com/repos/treehouselabs/BehatCommon/releases{/id}","created_at":"2015-07-14T09:35:47Z","updated_at":"2015-07-14T09:35:47Z","pushed_at":"2015-07-14T10:21:13Z","git_url":"git://github.com/treehouselabs/BehatCommon.git","ssh_url":"git@github.com:treehouselabs/BehatCommon.git","clone_url":"https://github.com/treehouselabs/BehatCommon.git","svn_url":"https://github.com/treehouselabs/BehatCommon","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"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":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/treehouselabs/BehatCommon/pulls/1"},"html":{"href":"https://github.com/treehouselabs/BehatCommon/pull/1"},"issue":{"href":"https://api.github.com/repos/treehouselabs/BehatCommon/issues/1"},"comments":{"href":"https://api.github.com/repos/treehouselabs/BehatCommon/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/treehouselabs/BehatCommon/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/treehouselabs/BehatCommon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/treehouselabs/BehatCommon/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/treehouselabs/BehatCommon/statuses/b0b9b64bc9076d4bad999925750cd158964645fc"}}}}