-
Notifications
You must be signed in to change notification settings - Fork 31
[Proposal] Adding Unit tests #69
Comments
Yeah we should add these and I'm all for it. I think the php side should be pretty basic. It's all just basic crud operations for the most part. The js/coffee needs some tests but I haven't gotten around to them. 😦 |
👍 |
I would definitely help to write unit tests. I'm all about testing since laravel. :-D |
Hey, I just wanted to let you know about the work I've done so far on unit Right know I'm figuring out how to test Cache, Config & Validator as Anyway. Check out the changes I've made and let me know any answers or https://github.com/MetalMatze/wardrobecms-core/compare/testing;DbPostRepository |
Laravel's Facades can be mocked easily without any extra work. http://laravel.com/docs/testing#mocking-facades |
Yes facades can be mocked easily, but not if we don't have a laravel instance. Since we don't have the bootstrap.php in the core. So we'll have to create some other workaround. That will only work in a default laravel app. Well, we (I) wanted to create unit tests. They test each and every single method of the repository. They should test everything around eloquent. In order to be able to do that we need to mock eloquent and test if it get's the correct values. What you proposed would be functional/integration tests, that should definitely be added in the future. |
Then first, we should create a bootstrap file to include autoloaded classes. Since this is a Laravel package, we should use these mocking features of Laravel. You're right we should have unit tests of repository classes but I just find it too early. Everybody has different approach in testing. What I mean by saying apply functional tests on So I think we should decide how we will test this app in the first step as a community to prove the stability of the app. On the other hand, the leaders or the community should decide about some practices. |
First, thanks for this great cms.
Looks like the project doesn't contain unit tests. I'd like propose to implement unit tests because of well known reasons. Then we can use a continuous integration service (eg TravisCI) to make sure each pull request works properly and can be merged. After implementation of the features and the unit tests the project can be ready to be released.
If this proposal is accepted by the community, I'll be pleased to help to implement tests.
The text was updated successfully, but these errors were encountered: