Ci Phpunit Test Versions Save

An easier way to use PHPUnit with CodeIgniter 3.x.

v1.0.0

3 years ago
  • The first official version
  • Same as v0.19.0

v0.19.0

3 years ago

Changed

  • If you use Monkey Patching with nikic/PHP-Parser 4.6 or later, the line number when an error occurs is probably different from the actual source code. Please check the cache file of the source that Monkey Patching creates.

Added

  • Now you can use nikic/PHP-Parser 4.6 or later as a Composer dependency. See #364, #366.
  • Now you can specify custom test directory. See #362.
  • Add functionality to create mocks on consecutive calls. See #339.
  • Add functionality to change ENVIRONMENT constant value testing. See #360.

Fixed

  • Fix bug that config.php is loaded before constants.php. See #348.

v0.18.0

4 years ago

Added

  • Now you can assert whether a message is logged. See #331.

Fixed

  • Fix bug that config files are not loaded with HMVC. See #327, #328.
  • Fix bug that NetBeans test suite provider causes Class 'PHPUnit_Util_Configuration' not found. See #313.
  • Fix bug that $assign_to_config does not work. See #314.

v0.17.3

4 years ago

Fixed

  • Fix buggy tearDown() with MySQL. See #321.

Others

  • Add and fix PHPDoc

v0.17.2

4 years ago

Fixed

  • Fix bug when you enable exit patcher only, it causes errors. See #320.
  • Fix bug that Monkey Patch causes errors on PHP 7.4. See #318.

v0.17.1

4 years ago

Fixed

  • Fix bug that CIPHPUnitTestDbTestCase reconnects DB on every assertions. See #301.
  • Fix typo in CIPHPUnitTestDbTestCase. See #299.
  • Fix bug that PHPUnit\Framework\MockObject\Stub does not work. See #307.
  • Fix bug that modified helpers are not loaded. See #310.

Added

  • Now you can use _ci_phpunit_test directly from vendor path. See #274.

Others

  • Update nikic/PHP-Parser to v3.1.5
  • Add nikic/PHP-Parser 4.2 as a Composer dependency

v0.17.0

5 years ago

Fixed

  • Fix bug that you can't use $this->request() and DbTestCase class at the same time.
  • Fix MonkeyPatch::patchConstant() when the user does not specify $class_method. See #251.
  • Fix bug that vendor/kenjis/ci-phpunit-test/update.php does not work.

Added

  • Now Seeder can call dependent seeders. See How to Write Tests.
  • $this->resetInstance() could create MY_Controller instance in stead of CI_Controller instance. See #271.
  • Now you can change Monkey Patch debug log file path. See #243.

Others

  • Compatible with CodeIgniter 3.1.10

v0.16.1

6 years ago

Fixed

  • Fix bug that installer replaces file path in tests/Bootstrap.php with wrong code which causes Parse error. See #247.
  • Fix bug that $this->request() can't be called more than once in a test method. See #248.

Others

  • Compatible with CodeIgniter 3.1.8

v0.16.0

6 years ago

Upgrade Note

  • Now ci-phpunit-test detects all warnings and notices during $this->request() execution, and throws exceptions. If you want to disable the checking, you must add protected $strictRequestErrorCheck = false; in your test classes. See #235.
  • If you use $this->newModel(), $this->newLibrary(), $this->newController() in your test cases, please install tests/UnitTestCase.php manually, and change the base classname of the test cases to UnitTestCase class. See #233.
  • Now ci-phpunit-test replaces CI_Output. If you use MY_Output, it might delete ci-phpunit-test override for testing. See How to Write Tests for the details.

Changed

  • Now ci-phpunit-test detects all warnings and notices during $this->request() execution, and throws exceptions.
  • $this->newModel(), $this->newLibrary(), $this->newController() moved to UnitTestCase class.
  • Now ci-phpunit-test replaces CI_Output.

Added

  • Now you can pass more than 5 arguments to $this->verifyInvoked*(). See #192.
  • Now you can assert whether a response cookie is just present or not. See #205.
  • Now you can move tests folder if you define TESTPATH in application/tests/Bootstrap.php.
  • Now you can specify custom application and public directory when you install via Composer. See README.

Fixed

  • Fix bug that set_status_header() in controller constructor gets overwritten. See #194.
  • Fix bug that MY_Config is not loaded in $this->request(). See #196.

Others

  • Compatible with CodeIgniter 3.1.7

v0.15.0

7 years ago

Added

  • Now you can create a mock which has a stubbed method that returns the mock itself with using $this->getDouble(). See #170.

Others

  • Compatible with CodeIgniter 3.1.4