Releases: kenjis/ci-phpunit-test
Releases · kenjis/ci-phpunit-test
v0.10.0
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
v0.9.0
v0.8.2
v0.8.1
v0.8.0
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
inCIPHPUnitTestRequest
class (deprecated since v0.4.0). See How to Write Tests.
v0.7.0
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 whenshow_404()
orshow_error()
is called. Now it returns error message.$this->CI
inTestCase
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()
callsheader()
ifis_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
v0.6.1
Changed
- How to enable Monkey Patching has been changed.
TestCase::$enable_patcher
was removed. See How to Write Tests.
Added
- Monkey Patching on functions. See How to Write Tests.
- Monkey Patching on methods in user-defined classes. See How to Write Tests.
$this->resetInstance()
for better model testing. See #40.
Removed
TestCase::$enable_patcher
(Introduced in v0.5.0)
Others
- Compatible with CodeIgniter 3.0.1
v0.5.0
Changed
- Now CI PHPUnit Test replaces
redirect()
function by default. See #33.
Added
- Monkey Patching on
exit()
. CI PHPUnit Test could convertexit()
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)