CodeIgniter Forums

Full Version: ci-phpunit-test for CodeIgniter 3.0
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11
Hi, I'm building a new tool for CodeIgniter 3.0.

CI PHPUnit Test: It is an easier way to use PHPUnit with CodeIgniter 3.0.
You don't have to modify CodeIgniter core files at all!
Sorry, I've just changed folder structure and added new files.

tests/replace/ -> tests/_ci_phpunit_test/replacing/

If you update CI PHPUnit Test, please copy (overwrite) to "application/tests" folder and remove "application/tests/replace" folder.
I've been fixing some bugs and improving, and now you can run tests on NetBeans.
[Image: attachment.php?aid=210]

And I added Function/Class Reference:
I added helper methods to build mocks.

And I changed method naming of the class to camelCase. Because PHPUnit_Framework_TestCase uses camelCase.
I got reported trouble with autoload Session.

I added the fix:

If you have the same problem, try the latest master branch, please.
Thanks to a contributer, rochefort, now we can test 404 and 500 requests.
After my last post, I fixed:

* problem with CodeIgniter autoload completely
* $this->request()
* @runInSeparateProcess error

And I changed a lot internally according to feedbacks.

get_new_instance() is now deprecated. Please use reset_instance() instead.

Now ci-phpunit-test loads MY_Loader. If you have it, use it with caution.

I recommend all users to reinstall latest ci-phpunit-test.
Thanks to feedback from around the world, ci-phpunit-test has improved greatly.

I've just made the first release!

And I added more documentation how to write tests.

I recommend trying ci-phpunit-test to all CodeIgniter users who want to write application tests with PHPUnit.
I wrote introductory blog article.

Testing Codeigniter 3.0 applications with PHPUnit
A few bugs found. So I fixed and released v0.1.1:

And if you installed CodeIgniter via official Zip file, you can install CI PHPUnit Test more easily than before.
Pages: 1 2 3 4 5 6 7 8 9 10 11