{"action":"created","issue":{"url":"https://api.github.com/repos/FamilySearch/gedcomx-php/issues/38","labels_url":"https://api.github.com/repos/FamilySearch/gedcomx-php/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/FamilySearch/gedcomx-php/issues/38/comments","events_url":"https://api.github.com/repos/FamilySearch/gedcomx-php/issues/38/events","html_url":"https://github.com/FamilySearch/gedcomx-php/pull/38","id":90745385,"number":38,"title":"Faster tests with php-vcr","user":{"login":"justincy","id":1037458,"avatar_url":"https://avatars.githubusercontent.com/u/1037458?v=3","gravatar_id":"","url":"https://api.github.com/users/justincy","html_url":"https://github.com/justincy","followers_url":"https://api.github.com/users/justincy/followers","following_url":"https://api.github.com/users/justincy/following{/other_user}","gists_url":"https://api.github.com/users/justincy/gists{/gist_id}","starred_url":"https://api.github.com/users/justincy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justincy/subscriptions","organizations_url":"https://api.github.com/users/justincy/orgs","repos_url":"https://api.github.com/users/justincy/repos","events_url":"https://api.github.com/users/justincy/events{/privacy}","received_events_url":"https://api.github.com/users/justincy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-24T17:58:58Z","updated_at":"2015-06-30T16:49:56Z","closed_at":"2015-06-30T14:16:15Z","pull_request":{"url":"https://api.github.com/repos/FamilySearch/gedcomx-php/pulls/38","html_url":"https://github.com/FamilySearch/gedcomx-php/pull/38","diff_url":"https://github.com/FamilySearch/gedcomx-php/pull/38.diff","patch_url":"https://github.com/FamilySearch/gedcomx-php/pull/38.patch"},"body":"This is to close #23 by making the tests run faster. I used php-vcr to record the HTTP requests for playback during the tests. A few notes:\r\n\r\n* This isn't ready to be merged just yet. The test files run much faster separately, but when I run the whole suite together it only runs about 10 minutes faster. At least locally. I'm submitting the PR to see if it runs faster in travis. Either way, a 35 minute test suite when run locally is still too slow. I've tried disabled garbage collection (as recommended [here](https://scrutinizer-ci.com/blog/composer-gc-performance-who-is-affected-too)) but that didn't have any noticeable impact. So I'm going to start profiling.\r\n* I'm now seeding faker to generate repeatable data. This is necessary to replay recorded responses.\r\n* In one test, you can't make two of the same calls when expecting different data; e.g., reading a person after deleting a conclusion and expecting the response to be different. We are recording and responses are matched with requests based on the HTTP method, URL, and body. About halfway through I figured out how to add a cache breaker to the responses to create unique URLs for matching.\r\n* Tests with files (creating memories) do not work with PHP VCR so they're not being recorded for now.\r\n* ~~I'm not recording vocabularies tests because the recorded data is large and there's only three tests.~~"},"comment":{"url":"https://api.github.com/repos/FamilySearch/gedcomx-php/issues/comments/117252806","html_url":"https://github.com/FamilySearch/gedcomx-php/pull/38#issuecomment-117252806","issue_url":"https://api.github.com/repos/FamilySearch/gedcomx-php/issues/38","id":117252806,"user":{"login":"adri","id":133832,"avatar_url":"https://avatars.githubusercontent.com/u/133832?v=3","gravatar_id":"","url":"https://api.github.com/users/adri","html_url":"https://github.com/adri","followers_url":"https://api.github.com/users/adri/followers","following_url":"https://api.github.com/users/adri/following{/other_user}","gists_url":"https://api.github.com/users/adri/gists{/gist_id}","starred_url":"https://api.github.com/users/adri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adri/subscriptions","organizations_url":"https://api.github.com/users/adri/orgs","repos_url":"https://api.github.com/users/adri/repos","events_url":"https://api.github.com/users/adri/events{/privacy}","received_events_url":"https://api.github.com/users/adri/received_events","type":"User","site_admin":false},"created_at":"2015-06-30T16:49:56Z","updated_at":"2015-06-30T16:49:56Z","body":"Huge merge! Congrats and thank you for helping making php-vcr better."}}