{"action":"created","comment":{"url":"https://api.github.com/repos/Saritasa/php-laravel-tools/pulls/comments/182806934","pull_request_review_id":113681146,"id":182806934,"diff_hunk":"@@ -0,0 +1,110 @@\n+<?php\n+\n+namespace Saritasa\\LaravelTools\\Tests;\n+\n+use Doctrine\\DBAL\\Connection;\n+use Doctrine\\DBAL\\DBALException;\n+use Doctrine\\DBAL\\Platforms\\AbstractPlatform;\n+use Doctrine\\DBAL\\Schema\\AbstractSchemaManager;\n+use Doctrine\\DBAL\\Schema\\Table;\n+use Doctrine\\DBAL\\Types\\Type;\n+use PHPUnit\\Framework\\TestCase;\n+use Saritasa\\LaravelTools\\Database\\SchemaReader;\n+\n+/**\n+ * Test Schema reader.\n+ */\n+class SchemaReaderTest extends TestCase\n+{\n+    /**\n+     * Test that exception will thrown if doctrine has not registered platform.\n+     *\n+     * @throws DBALException\n+     *\n+     * @return void\n+     */\n+    public function testExceptionWillThrownIfPlatformNotSet()\n+    {\n+        $doctrineConnection = \\Mockery::mock(Connection::class);\n+        $exception = new DBALException(str_random());\n+\n+        $doctrineConnection\n+            ->shouldReceive('getDatabasePlatform')\n+            ->withArgs([])\n+            ->andThrow($exception);\n+\n+        $this->expectExceptionObject($exception);\n+        /** @var Connection $doctrineConnection */\n+        new SchemaReader($doctrineConnection);\n+    }\n+\n+    /**\n+     * Test that exception will thrown if doctrine has not enum type.\n+     *\n+     * @throws DBALException\n+     *\n+     * @return void\n+     */\n+    public function testExceptionWillThrownIfEnumTypeNotExists()\n+    {\n+        $doctrineConnection = \\Mockery::mock(Connection::class);\n+        $platform = \\Mockery::mock(AbstractPlatform::class);\n+\n+        $exception = new DBALException(str_random());\n+\n+        $doctrineConnection\n+            ->shouldReceive('getDatabasePlatform')\n+            ->withArgs([])\n+            ->andReturn($platform);\n+\n+        $platform","path":"tests/SchemaReaderTest.php","position":60,"original_position":60,"commit_id":"929fd1f7a69015eae3575e48ee94db02db7a87a4","original_commit_id":"929fd1f7a69015eae3575e48ee94db02db7a87a4","user":{"login":"VladimirBerdnik","id":4003786,"avatar_url":"https://avatars1.githubusercontent.com/u/4003786?v=4","gravatar_id":"","url":"https://api.github.com/users/VladimirBerdnik","html_url":"https://github.com/VladimirBerdnik","followers_url":"https://api.github.com/users/VladimirBerdnik/followers","following_url":"https://api.github.com/users/VladimirBerdnik/following{/other_user}","gists_url":"https://api.github.com/users/VladimirBerdnik/gists{/gist_id}","starred_url":"https://api.github.com/users/VladimirBerdnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladimirBerdnik/subscriptions","organizations_url":"https://api.github.com/users/VladimirBerdnik/orgs","repos_url":"https://api.github.com/users/VladimirBerdnik/repos","events_url":"https://api.github.com/users/VladimirBerdnik/events{/privacy}","received_events_url":"https://api.github.com/users/VladimirBerdnik/received_events","type":"User","site_admin":false},"body":"But in our package we don't expect any exceptions and don't handle any exception of third-party package in place that this test cover","created_at":"2018-04-19T16:25:28Z","updated_at":"2018-04-19T16:25:28Z","html_url":"https://github.com/Saritasa/php-laravel-tools/pull/11#discussion_r182806934","pull_request_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/pulls/11","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Saritasa/php-laravel-tools/pulls/comments/182806934"},"html":{"href":"https://github.com/Saritasa/php-laravel-tools/pull/11#discussion_r182806934"},"pull_request":{"href":"https://api.github.com/repos/Saritasa/php-laravel-tools/pulls/11"}},"in_reply_to_id":182700538},"pull_request":{"url":"https://api.github.com/repos/Saritasa/php-laravel-tools/pulls/11","id":181470124,"html_url":"https://github.com/Saritasa/php-laravel-tools/pull/11","diff_url":"https://github.com/Saritasa/php-laravel-tools/pull/11.diff","patch_url":"https://github.com/Saritasa/php-laravel-tools/pull/11.patch","issue_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/issues/11","number":11,"state":"open","locked":false,"title":"Improve unit tests. Small code refactoring.","user":{"login":"veeeeeRySeXy","id":10694924,"avatar_url":"https://avatars1.githubusercontent.com/u/10694924?v=4","gravatar_id":"","url":"https://api.github.com/users/veeeeeRySeXy","html_url":"https://github.com/veeeeeRySeXy","followers_url":"https://api.github.com/users/veeeeeRySeXy/followers","following_url":"https://api.github.com/users/veeeeeRySeXy/following{/other_user}","gists_url":"https://api.github.com/users/veeeeeRySeXy/gists{/gist_id}","starred_url":"https://api.github.com/users/veeeeeRySeXy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veeeeeRySeXy/subscriptions","organizations_url":"https://api.github.com/users/veeeeeRySeXy/orgs","repos_url":"https://api.github.com/users/veeeeeRySeXy/repos","events_url":"https://api.github.com/users/veeeeeRySeXy/events{/privacy}","received_events_url":"https://api.github.com/users/veeeeeRySeXy/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-13T12:13:00Z","updated_at":"2018-04-19T16:25:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58bacf1e1b6303048ea399f1ed6b69e5d69b864c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/pulls/11/commits","review_comments_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/pulls/11/comments","review_comment_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/issues/11/comments","statuses_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/statuses/929fd1f7a69015eae3575e48ee94db02db7a87a4","head":{"label":"veeeeeRySeXy:master","ref":"master","sha":"929fd1f7a69015eae3575e48ee94db02db7a87a4","user":{"login":"veeeeeRySeXy","id":10694924,"avatar_url":"https://avatars1.githubusercontent.com/u/10694924?v=4","gravatar_id":"","url":"https://api.github.com/users/veeeeeRySeXy","html_url":"https://github.com/veeeeeRySeXy","followers_url":"https://api.github.com/users/veeeeeRySeXy/followers","following_url":"https://api.github.com/users/veeeeeRySeXy/following{/other_user}","gists_url":"https://api.github.com/users/veeeeeRySeXy/gists{/gist_id}","starred_url":"https://api.github.com/users/veeeeeRySeXy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veeeeeRySeXy/subscriptions","organizations_url":"https://api.github.com/users/veeeeeRySeXy/orgs","repos_url":"https://api.github.com/users/veeeeeRySeXy/repos","events_url":"https://api.github.com/users/veeeeeRySeXy/events{/privacy}","received_events_url":"https://api.github.com/users/veeeeeRySeXy/received_events","type":"User","site_admin":false},"repo":{"id":129386660,"name":"php-laravel-tools","full_name":"veeeeeRySeXy/php-laravel-tools","owner":{"login":"veeeeeRySeXy","id":10694924,"avatar_url":"https://avatars1.githubusercontent.com/u/10694924?v=4","gravatar_id":"","url":"https://api.github.com/users/veeeeeRySeXy","html_url":"https://github.com/veeeeeRySeXy","followers_url":"https://api.github.com/users/veeeeeRySeXy/followers","following_url":"https://api.github.com/users/veeeeeRySeXy/following{/other_user}","gists_url":"https://api.github.com/users/veeeeeRySeXy/gists{/gist_id}","starred_url":"https://api.github.com/users/veeeeeRySeXy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/veeeeeRySeXy/subscriptions","organizations_url":"https://api.github.com/users/veeeeeRySeXy/orgs","repos_url":"https://api.github.com/users/veeeeeRySeXy/repos","events_url":"https://api.github.com/users/veeeeeRySeXy/events{/privacy}","received_events_url":"https://api.github.com/users/veeeeeRySeXy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/veeeeeRySeXy/php-laravel-tools","description":"Allows to generate FormRequest and DTO object for models","fork":true,"url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools","forks_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/forks","keys_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/teams","hooks_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/hooks","issue_events_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/issues/events{/number}","events_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/events","assignees_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/assignees{/user}","branches_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/branches{/branch}","tags_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/tags","blobs_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/languages","stargazers_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/stargazers","contributors_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/contributors","subscribers_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/subscribers","subscription_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/subscription","commits_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/contents/{+path}","compare_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/merges","archive_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/downloads","issues_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/issues{/number}","pulls_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/labels{/name}","releases_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/releases{/id}","deployments_url":"https://api.github.com/repos/veeeeeRySeXy/php-laravel-tools/deployments","created_at":"2018-04-13T10:24:03Z","updated_at":"2018-04-13T12:11:59Z","pushed_at":"2018-04-13T12:11:57Z","git_url":"git://github.com/veeeeeRySeXy/php-laravel-tools.git","ssh_url":"git@github.com:veeeeeRySeXy/php-laravel-tools.git","clone_url":"https://github.com/veeeeeRySeXy/php-laravel-tools.git","svn_url":"https://github.com/veeeeeRySeXy/php-laravel-tools","homepage":"","size":175,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Saritasa:master","ref":"master","sha":"95faa331959f2f9869068343c631270ba4c13f48","user":{"login":"Saritasa","id":22166162,"avatar_url":"https://avatars0.githubusercontent.com/u/22166162?v=4","gravatar_id":"","url":"https://api.github.com/users/Saritasa","html_url":"https://github.com/Saritasa","followers_url":"https://api.github.com/users/Saritasa/followers","following_url":"https://api.github.com/users/Saritasa/following{/other_user}","gists_url":"https://api.github.com/users/Saritasa/gists{/gist_id}","starred_url":"https://api.github.com/users/Saritasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Saritasa/subscriptions","organizations_url":"https://api.github.com/users/Saritasa/orgs","repos_url":"https://api.github.com/users/Saritasa/repos","events_url":"https://api.github.com/users/Saritasa/events{/privacy}","received_events_url":"https://api.github.com/users/Saritasa/received_events","type":"Organization","site_admin":false},"repo":{"id":121709078,"name":"php-laravel-tools","full_name":"Saritasa/php-laravel-tools","owner":{"login":"Saritasa","id":22166162,"avatar_url":"https://avatars0.githubusercontent.com/u/22166162?v=4","gravatar_id":"","url":"https://api.github.com/users/Saritasa","html_url":"https://github.com/Saritasa","followers_url":"https://api.github.com/users/Saritasa/followers","following_url":"https://api.github.com/users/Saritasa/following{/other_user}","gists_url":"https://api.github.com/users/Saritasa/gists{/gist_id}","starred_url":"https://api.github.com/users/Saritasa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Saritasa/subscriptions","organizations_url":"https://api.github.com/users/Saritasa/orgs","repos_url":"https://api.github.com/users/Saritasa/repos","events_url":"https://api.github.com/users/Saritasa/events{/privacy}","received_events_url":"https://api.github.com/users/Saritasa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Saritasa/php-laravel-tools","description":"Allows to generate FormRequest and DTO object for models","fork":false,"url":"https://api.github.com/repos/Saritasa/php-laravel-tools","forks_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/forks","keys_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/teams","hooks_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/hooks","issue_events_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/issues/events{/number}","events_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/events","assignees_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/assignees{/user}","branches_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/branches{/branch}","tags_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/tags","blobs_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/languages","stargazers_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/stargazers","contributors_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/contributors","subscribers_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/subscribers","subscription_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/subscription","commits_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/contents/{+path}","compare_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/merges","archive_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/downloads","issues_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/issues{/number}","pulls_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/labels{/name}","releases_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/releases{/id}","deployments_url":"https://api.github.com/repos/Saritasa/php-laravel-tools/deployments","created_at":"2018-02-16T02:50:54Z","updated_at":"2018-04-11T03:43:53Z","pushed_at":"2018-04-13T12:13:01Z","git_url":"git://github.com/Saritasa/php-laravel-tools.git","ssh_url":"git@github.com:Saritasa/php-laravel-tools.git","clone_url":"https://github.com/Saritasa/php-laravel-tools.git","svn_url":"https://github.com/Saritasa/php-laravel-tools","homepage":"","size":164,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":2,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Saritasa/php-laravel-tools/pulls/11"},"html":{"href":"https://github.com/Saritasa/php-laravel-tools/pull/11"},"issue":{"href":"https://api.github.com/repos/Saritasa/php-laravel-tools/issues/11"},"comments":{"href":"https://api.github.com/repos/Saritasa/php-laravel-tools/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/Saritasa/php-laravel-tools/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/Saritasa/php-laravel-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Saritasa/php-laravel-tools/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/Saritasa/php-laravel-tools/statuses/929fd1f7a69015eae3575e48ee94db02db7a87a4"}},"author_association":"NONE"}}
{"actor":{"display_login":"VladimirBerdnik"}}