Skip to content

Releases: kenjis/ci-phpunit-test

v0.10.0

27 Nov 01:55
Compare
Choose a tag to compare

Fixed

  • Fix wrong implementation of resetting CodeIgniter instance. Now reset_instance() remove the existing CodeIgniter instance. See #74.

Changed

  • Now $this->getDouble() does not call the original constructor by default. See Function/Class Reference.
  • Now reset_instance() remove the existing CodeIgniter instance. See #74.

Added

  • NetBeans test suite provider application/tests/_ci_phpunit_test/TestSuiteProvider.php. To use it, go to Project Properties > Testing, check Use Custom Test Suite checkbox, and select the file.

v0.9.1

21 Nov 23:25
Compare
Choose a tag to compare

Fixed

  • Fix bug that phpunit dies when Unable to locate the specified class error.

Others

  • Improved documentation.

v0.9.0

18 Nov 10:14
Compare
Choose a tag to compare

Added

  • $this->request->addCallable() to add callable. See #68.
  • Autoloading classes in application/modules folder.
  • You can configure search paths for autoloader. See How to Write Tests.

Others

  • Compatible with CodeIgniter 3.0.3

v0.8.2

09 Oct 00:33
Compare
Choose a tag to compare

Fixed

  • Fix bug that monkey patching changes original source code in some cases of heredoc/nowdoc strings.

Others

  • Compatible with CodeIgniter 3.0.2
  • Compatible with PHP 7.0.0-RC4
  • Update nikic/PHP-Parser to v1.4.1

v0.8.1

01 Oct 10:12
Compare
Choose a tag to compare

Fixed

  • Fix bug that $route['404_override'] controller/method is called in Bootstrap. See #63.

v0.8.0

28 Sep 01:50
Compare
Choose a tag to compare

Changed

  • Better support for SQLite in-memory database. Now reset_instance() does not close SQLite in-memory database connection.

Fixed

  • Fix bug that $this->getDouble() can't create mocks which have methods named method.
  • Fix bug that monkey patching which returns null does not work.

Removed

  • Property $bc_mode_throw_PHPUnit_Framework_Exception in CIPHPUnitTestRequest class (deprecated since v0.4.0). See How to Write Tests.

v0.7.0

09 Sep 09:55
Compare
Choose a tag to compare

Upgrade Note

  • Please update application/tests/phpunit.xml. Replace it or apply this patch. See #52.

Changed

  • Now $this->warningOff() turns off Notice, too.

Added

  • Now $this->request() can create REST request more easily. See #47.
  • $this->request->setHeader() to set HTTP request header. See #47.
  • $this->assertResponseHeader() to assert HTTP response header. See #47.
  • You can add query string in URI string of $this->request(). See #51.
  • Autoloading for libraries
  • Add application/libraries/Session/MY_Session.php as a sample
  • ReflectionHelper class to access non-public method or property. See Function/Class Reference.

Fixed

  • $this->request() returns null when show_404() or show_error() is called. Now it returns error message.
  • $this->CI in TestCase class after calling $this->request() is still the previous instance. #50.
  • Autoloader only searches class files only in top level and sub folder for them. #48.
  • set_status_header() calls header() if is_cli() returns false.
  • Fix phpunit.xml. See #52.

Removed

  • 4th param $callable of $this->request() and $this->ajaxRequest() (deprecated since v0.3.0)
    Use $this->request->setCallable() method instead. See Function/Class Reference.

Others

  • Add documentation for CodeIgniter Rest Server. See How to Write Tests.
  • Compatible with PsySH v0.5.2

v0.6.2

13 Aug 01:30
Compare
Choose a tag to compare

Fixed

  • Fix bug that can't test model classes (classes in application/models folder) which do not extend CI_Model more than once.

v0.6.1

11 Aug 23:33
Compare
Choose a tag to compare

Changed

  • How to enable Monkey Patching has been changed. TestCase::$enable_patcher was removed. See How to Write Tests.

Added

Removed

  • TestCase::$enable_patcher (Introduced in v0.5.0)

Others

  • Compatible with CodeIgniter 3.0.1

v0.5.0

27 Jul 07:23
Compare
Choose a tag to compare

Changed

  • Now CI PHPUnit Test replaces redirect() function by default. See #33.

Added

  • Monkey Patching on exit(). CI PHPUnit Test could convert exit() in your code to Exception on the fly. See #32.
  • $this->request->setCallablePreConstructor() to inject mocks into your controller constructors. See #29.

Fixed

  • Fix bug that PHPUnit debug info of the first test is not outputted.

Removed

  • get_new_instance() (deprecated since pre v0.1.0)