ci-phpunit-test for CodeIgniter 3.0 |
v0.8.1 bug fix version was released.
https://github.com/kenjis/ci-phpunit-test/releases
Now ci-phpunit-test dev-master supports PHP7!
https://travis-ci.org/kenjis/ci-phpunit-...s/83617994
v0.8.2 bug fix version was released.
https://github.com/kenjis/ci-phpunit-test/releases
This is great software with great documentation, however I still have one issue.
I don't know how to set private properties in my controllers. Several of my controllers have methods whose functionality depends on protected arrays set in core/My_Controller. I want to write tests which will be able to set this private properties. Is this possible and how to do it? I'm using Codeigniter 3.0.0, PHPUnit 5.0.5 and CI PHPUnit Test 0.8.2 Thanks in advance P.S I'm new to this forum and I hope this is the right place for this question. (10-12-2015, 06:29 AM)nighthawk Wrote: This is great software with great documentation, however I still have one issue.Welcome to the forum. You're in the right place. ci-phpunit-test has a helper method for it: https://github.com/kenjis/ci-phpunit-tes...erty-value
If you have installed HMVC, ci-phpunit-test did not work because of error.
Today I commited the change not to cause the error. If you apply the patch below, you can run phpunit without errors. Code: --- a/application/third_party/MX/Modules.php But I still don't know HMVC and ci-phpunit work fine or not. If there is someone who wants to use HMVC and ci-phpunit-test, please test master branch of ci-phpunit-test.
It seems there is still a bit long way to work with HMVC.
If there is someone who try it, see https://github.com/kenjis/ci-phpunit-tes...-149083614
こんにちわ かえんぎ さん お げんき です か
I must admit this is really interesting. I have never studied unit testing and tend to just test my controllers by typing and changing the input and seeing if any of my views break. Look forward to reading your book. Thank you for all your hard work so far.
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
(10-18-2015, 11:09 PM)iamthwee Wrote: こんにちわ かえんぎ さん お げんき です か Hi, your Japanese is a bit funny. Who is かえんぎ? Thank you for your interest. I have just published the second release of the book. http://forum.codeigniter.com/thread-6294...#pid324344
Sorry it was supposed to be ka-e-n-gi = kenjis but to be honest I'm not sure how names translate using hirigana
![]() Anyway on topic, look forward to the release, did you guys decide on the cover?
Practical guide to IgnitedCMS - Book coming soon, www.ignitedcms.com
|
Welcome Guest, Not a member yet? Register Sign In |