• 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ci-phpunit-test for CodeIgniter 3.0

#11
v0.2.0 was released:
https://github.com/kenjis/ci-phpunit-test/releases

Only changes MY_url_helper.php as sample, and imporved documentation.

If you use new MY_url_helper.php (you have to install manually), redirect() throws PHPUnit_Framework_Exception. So you can know redirect() called easily.
Reply

#12
I added docs to use mocks in `request()`:
https://github.com/kenjis/ci-phpunit-tes...-use-mocks

If you guys have any questions or problem to write tests, feel free to ask.
Reply

#13
I created PR which contains BC break in `request()` method:
https://github.com/kenjis/ci-phpunit-test/pull/22

If you have any opinions, feel free to comment.
Reply

#14
v0.3.0 was released:
https://github.com/kenjis/ci-phpunit-test/releases

* 4th param $callable of $this->request() and $this->ajaxRequest() is now deprecated. Use $this->request->setCallable().
* You can enable hooks for controller in controller testing. $this->request->enableHooks() is added.
Reply

#15
I've been improving documentation for ci-phpunit-test v0.4.0: https://github.com/kenjis/ci-phpunit-tes...teTests.md

Feedback is welcome.

v0.4.0 will be released soon.
Reply

#16
v0.4.0 was released:
https://github.com/kenjis/ci-phpunit-test/releases

I recommend all users to upgrade.

* Now you can test controller's response code
* Now you can test `redirect()` more easily
Reply

#17
I'm going to release v0.5.0 next week.

On the version, you can test code contains `exit()`. New feature enables converting exit() to Exception on the fly.

If you have interested in it, please try `dev-master`. Feedback is welcome.

See https://github.com/kenjis/ci-phpunit-tes...t-released
Reply

#18
v0.5.0 was released:
https://github.com/kenjis/ci-phpunit-test/releases
  • Now you don't have to create MY_url_helper for testing redirect()
  • Now you can test your apps that contains exit()
  • Now you can inject your mock into controller constructors
I wrote an article about exit():
Now you can write tests for Codeigniter 3.0 apps that contains exit() with ci-phpunit-test
Reply

#19
Nice work dude.
No SEO spam
Reply

#20
(07-27-2015, 02:34 AM)solidcodes Wrote: Nice work dude.

Thank you!
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.