Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve unit test coverage #82

Closed
klaussilveira opened this issue Jul 14, 2012 · 5 comments
Closed

Improve unit test coverage #82

klaussilveira opened this issue Jul 14, 2012 · 5 comments
Assignees
Labels
Milestone

Comments

@klaussilveira
Copy link
Owner

No description provided.

@ghost ghost assigned klaussilveira Jul 14, 2012
@DannyvdSluijs
Copy link
Collaborator

I'm working on the unit test, already at a 52,78% LoC coverage. @klaussilveira, I send you an e-mail regarding the unit test.

@klaussilveira
Copy link
Owner Author

Are you working with unit or functional tests? Maybe both? The current test suite in GitList has functional tests for the interface only.

@DannyvdSluijs
Copy link
Collaborator

Both unit, as functional. As the majority can be tested with unit, the controllers require functional. I already splitted up the InterfaceTest file, to their proper test files
src/GitList/Controller/MainController.php => test/src/GitList/Controller/MainControllerTest.php
etc.

I just need to work out as that created some duplicate code, to setup the two initial repositories, I'll ponder my brain over that during this week.Hopefully I'll be able to request a pull early next week. Due to some social items in my agenda :-)

@DannyvdSluijs
Copy link
Collaborator

Come to think of it, creating a single method for the setting up the repositories would couple the tests together, so I am actually thinking of leaving each separate controller test with its own setupBeforeClass and tearDownAfterClass methods.

Any feedback on this ?

@klaussilveira
Copy link
Owner Author

I don't see a problem with this approach. You can also create a fixture file and load it, if the setupBeforeClass() method get's too repetitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants