ci-phpunit-test for CodeIgniter 3.0 |
(10-19-2015, 05:03 AM)iamthwee Wrote: Sorry it was supposed to be ka-e-n-gi = kenjis but to be honest I'm not sure how names translate using hirigana My real name is Kenji = ke-n-ji. We did not decide the cover yet. We are still looking for a good photo for the book.
v0.9.0 was released.
https://github.com/kenjis/ci-phpunit-test/releases * `$this->request->addCallable()` to add callable. * Autoloading classes in `application/modules` folder. * You can configure search paths for autoloader.
I'm planning to merge the PR: https://github.com/kenjis/ci-phpunit-test/pull/74
It changes $this->getDouble() method. If you have any trouble with your existing test cases when you apply the patch, please let me know. (11-19-2015, 06:15 PM)kenjis Wrote: I'm planning to merge the PR: https://github.com/kenjis/ci-phpunit-test/pull/74 The PR initially only contains the change of $this->getDouble(). But after all, I got to the conclusion that the reset_instance() implementation was wrong. So I added the fix. I've just merged the PR, so now 1.0.x@dev (dev-master) includes BC break changes. See https://github.com/kenjis/ci-phpunit-tes...md#changed for details.
I've just released v0.10.0: https://github.com/kenjis/ci-phpunit-test/releases
This includes BC break according to bug fix. * Now reset_instance() removes the existing CodeIgniter instance. * Now $this->getDouble() does not call the original constructor by default. The changes may break your test code. If so, please fix or update your tests.
Here is the current specification of ci-phpunit-test for CodeIgniter Hooks:
https://github.com/kenjis/ci-phpunit-tes...s.md#hooks If anyone has any opinion about it, please post to https://github.com/kenjis/ci-phpunit-test/issues/20 I think the current specification is good enough. So I'm planning to close the issue.
Hi guys!
Today ci-phpunit-test got 90 stars on GitHub. If you like it and don't mind, please star it on https://github.com/kenjis/ci-phpunit-test
Hi, I'm trying to use your this library, it works fine with controllers, I have a problem with model testing.
As instructed in your guide, I extracted your library into application/tests I tried with my own model test, and then created test for your Category_model, also, the model with a proper method is created, as well as table in database. Your CategorySeeder successfully inserted data into database. Category_model_test.php is copy/paste as from example: PHP Code: class Category_model_test extends TestCase I've got the following error by PHPunit; Code: Fatal error: Call to a member function query() on null in /var/www/html/lipa2016/application/models/Category_model.php on line 11 return $this->db->query("SELECT * FROM category"); Category_model.php is this: PHP Code: <?php If I uncomment query like this: $this->db->order_by ( 'name', 'asc' ); return $this->db->get ('category'); I've got error from phpunit: Code: Severity: Error PHPUnit version is 5.1.3, PHP version is 5.6.14, The same error was with PHPUnit 4.8 and php 5.4. If you need more details about the code, please, let me know. Regards,
12-30-2015, 07:26 PM
(This post was last modified: 12-30-2015, 07:27 PM by kenjis. Edit Reason: Fix filename )
@resolv_25
Tests run on `testing` environment. https://github.com/kenjis/ci-phpunit-tes...nvironment Did you setup database.php for testing environment correctly?
I've just released v0.10.1: https://github.com/kenjis/ci-phpunit-test/releases
It includes only small bug fixes. |
Welcome Guest, Not a member yet? Register Sign In |