{"action":"created","issue":{"url":"https://api.github.com/repos/liip/LiipFunctionalTestBundle/issues/332","repository_url":"https://api.github.com/repos/liip/LiipFunctionalTestBundle","labels_url":"https://api.github.com/repos/liip/LiipFunctionalTestBundle/issues/332/labels{/name}","comments_url":"https://api.github.com/repos/liip/LiipFunctionalTestBundle/issues/332/comments","events_url":"https://api.github.com/repos/liip/LiipFunctionalTestBundle/issues/332/events","html_url":"https://github.com/liip/LiipFunctionalTestBundle/issues/332","id":257653169,"number":332,"title":"Refact the bundle to be more stable and faster","user":{"login":"Aerendir","id":1968622,"avatar_url":"https://avatars3.githubusercontent.com/u/1968622?v=4","gravatar_id":"","url":"https://api.github.com/users/Aerendir","html_url":"https://github.com/Aerendir","followers_url":"https://api.github.com/users/Aerendir/followers","following_url":"https://api.github.com/users/Aerendir/following{/other_user}","gists_url":"https://api.github.com/users/Aerendir/gists{/gist_id}","starred_url":"https://api.github.com/users/Aerendir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aerendir/subscriptions","organizations_url":"https://api.github.com/users/Aerendir/orgs","repos_url":"https://api.github.com/users/Aerendir/repos","events_url":"https://api.github.com/users/Aerendir/events{/privacy}","received_events_url":"https://api.github.com/users/Aerendir/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-09-14T09:29:18Z","updated_at":"2017-09-15T09:03:59Z","closed_at":null,"author_association":"NONE","body":"Hi @alexislefebvre and @lsmith77 , how are you?\r\n\r\nExcuse me for my long absence, but I were in the process of closing the first version of my app and I had to concentrate on it.\r\n\r\nBut now that it is online, I'd like to start again contributing here.\r\n\r\nWe leave ourselves speaking about the fastness of this bundle (#218).\r\n\r\nThen the the discourse was left to itself.\r\n\r\nI'm opening this issue to try to make a recap of what we said and to draft a first (small) plan (so I can afford it given the time I have to dedicate to LiipFunctionTestBundle).\r\n\r\nSo, here are the things I think are priorities to create a better and faster bundle:\r\n\r\n- [ ] Fix #323: Move library files to `src` and tests files to `tests`;\r\n- [ ] Ordering methods following this order: `public`, `protected` and `private` (this will make for developer easier to understand the API (s)he can use;\r\n- [ ] Split the big `WebTestCase.php` in smaller files: `AbstractTestCase` from which inherit `WebTestCase` and `CommandTestCase`. This will make us able to move to dedicated files methods that are relevant only for one kind of test (for example, `getVerbosityLevel()` that is relevant only for commands or see also #329 )\r\n- [ ] Fix #218: Start using properties (also not `private` to not BC) to store objects created by the bundle: this makes us able to do the next task...\r\n- [ ] Start using `setUp()` and `tearDown()` methods to unset properties to free up memory during execution and make tests faster\r\n- [ ] Start using getters and setter, deprecating the usage of direct access to properties (that should be private: extending classes should use getters and setters)\r\n- [ ] Improve `fetchContent()` and `fetchCrawler()`: they MUST set (or use the already created - for this reason is useful using getters and setters: we can check if a `client` already exists and avoid creating a new one) the `$client` property, and not creating each time the client. There are use cases (mostly after a form is submitted) where it is required to reuse the same exact client created to load some subsequent pages: in those cases it is impossible to use the same `$client` and the only option is to create it directly in the test method using `makeClient()`, forcing the developer to write more code.\r\n- [ ] Maybe also using `PHPCSFixer` is a good thing...\r\n\r\nAll this will be a good preparation also for the #6 , making easier the transition process.\r\n\r\nThis is a first list: what do you think about it?"},"comment":{"url":"https://api.github.com/repos/liip/LiipFunctionalTestBundle/issues/comments/329725037","html_url":"https://github.com/liip/LiipFunctionalTestBundle/issues/332#issuecomment-329725037","issue_url":"https://api.github.com/repos/liip/LiipFunctionalTestBundle/issues/332","id":329725037,"user":{"login":"Aerendir","id":1968622,"avatar_url":"https://avatars3.githubusercontent.com/u/1968622?v=4","gravatar_id":"","url":"https://api.github.com/users/Aerendir","html_url":"https://github.com/Aerendir","followers_url":"https://api.github.com/users/Aerendir/followers","following_url":"https://api.github.com/users/Aerendir/following{/other_user}","gists_url":"https://api.github.com/users/Aerendir/gists{/gist_id}","starred_url":"https://api.github.com/users/Aerendir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Aerendir/subscriptions","organizations_url":"https://api.github.com/users/Aerendir/orgs","repos_url":"https://api.github.com/users/Aerendir/repos","events_url":"https://api.github.com/users/Aerendir/events{/privacy}","received_events_url":"https://api.github.com/users/Aerendir/received_events","type":"User","site_admin":false},"created_at":"2017-09-15T09:03:59Z","updated_at":"2017-09-15T09:03:59Z","author_association":"NONE","body":"@alexislefebvre Reading again your comments, I saw that you spoke about the splitting in several bundles.\r\n\r\nCurrently I don't have a precise idea about this, but I think that the first step is to start splitting the big `WebTestCase` file.\r\n\r\nThen, another thing to start considering is to create more services (as also suggested by @lsmith77 in #6 ).\r\n\r\nOnce the code is split, then we will also have a better view of which can become a dedicated bundle and which, instead, should remain in this one."}}
{"actor":{"display_login":"Aerendir"}}