[Agavi-Tickets] [Agavi] #1457: Running unit tests with PHPUnit 3.6

9 views
Skip to first unread message

Agavi

unread,
Dec 1, 2011, 4:49:06 AM12/1/11
to tic...@lists.agavi.org
#1457: Running unit tests with PHPUnit 3.6
---------------------------------------------+------------------------------
Reporter: koen.vandaele@… | Owner: felix
Type: defect | Status: new
Priority: normal | Milestone:
Component: testing | Version: 1.0.6
Severity: normal | Keywords:
Has_patch: 0 |
---------------------------------------------+------------------------------
Running unit tests with phpunit 3.6, gives a lot of the following errors:

{{{
RuntimeException: PHP Fatal error: Call to undefined method
PHPUnit_Framework_TestResult::collectRawCodeCoverageInformation() in - on
line 5
PHP Stack trace:
PHP 1. {main}() -:0
PHP 2. __phpunit_run_isolated_test() -:247
}}}

From looking at the source code, this method has been removed from
PHPUnit_Framework_TestResult in PHPUnit 3.6. Is supporting both PHPunit
3.5 and 3.6 at all possible?

I've experienced this with 1.0.6. From looking at the changelog for 1.0.7
I don't see any fixes for this.

--
Ticket URL: <http://trac.agavi.org/ticket/1457>
Agavi <http://www.agavi.org/>
An MVC Framework for PHP5

_______________________________________________
Agavi Tickets Mailing List
tic...@lists.agavi.org
http://lists.agavi.org/mailman/listinfo/tickets

Agavi

unread,
Dec 2, 2011, 3:16:44 PM12/2/11
to tic...@lists.agavi.org
#1457: Running unit tests with PHPUnit 3.6
---------------------------------------------+------------------------------
Reporter: koen.vandaele@… | Owner: david
Type: defect | Status: assigned

Priority: normal | Milestone:
Component: testing | Version: 1.0.6
Severity: normal | Keywords:
Has_patch: 0 |
---------------------------------------------+------------------------------
Changes (by david):

* owner: felix => david
* status: new => assigned


Comment:

Thanks for the info, Koen. I think we can have different test case
templates for 3.5 and 3.6 to cover this situation. Looks like the
templates have changed. in 3.6. I'll investigate.

--
Ticket URL: <http://trac.agavi.org/ticket/1457#comment:1>

Agavi

unread,
Dec 2, 2011, 3:17:00 PM12/2/11
to tic...@lists.agavi.org
#1457: Running unit tests with PHPUnit 3.6
---------------------------------------------+------------------------------
Reporter: koen.vandaele@… | Owner: david
Type: defect | Status: assigned
Priority: normal | Milestone: 1.0.7
Component: testing | Version: 1.0.6
Severity: normal | Keywords:
Has_patch: 0 |
---------------------------------------------+------------------------------
Changes (by david):

* milestone: => 1.0.7


--
Ticket URL: <http://trac.agavi.org/ticket/1457#comment:2>

Agavi

unread,
Dec 4, 2011, 5:06:48 PM12/4/11
to tic...@lists.agavi.org
#1457: Fatal errors with PHPUnit 3.6
---------------------------------------------+------------------------------
Reporter: koen.vandaele@… | Owner: david
Type: defect | Status: closed
Priority: normal | Milestone: 1.0.7
Component: testing | Version: 1.0.6
Severity: normal | Resolution: fixed
Keywords: | Has_patch: 0
---------------------------------------------+------------------------------
Changes (by david):

* status: assigned => closed
* resolution: => fixed


Comment:

(In [4882]) Fix #1457: Fatal errors with PHPUnit 3.6

--
Ticket URL: <http://trac.agavi.org/ticket/1457#comment:6>

Agavi

unread,
Dec 4, 2011, 4:39:20 PM12/4/11
to tic...@lists.agavi.org
#1457: Fatal errors with PHPUnit 3.6
---------------------------------------------+------------------------------

Reporter: koen.vandaele@… | Owner: david
Type: defect | Status: assigned
Priority: normal | Milestone: 1.0.7
Component: testing | Version: 1.0.6
Severity: normal | Keywords:
Has_patch: 0 |
---------------------------------------------+------------------------------

--
Ticket URL: <http://trac.agavi.org/ticket/1457#comment:3>

Agavi

unread,
Dec 4, 2011, 5:04:58 PM12/4/11
to tic...@lists.agavi.org
#1457: Fatal errors with PHPUnit 3.6
---------------------------------------------+------------------------------

Reporter: koen.vandaele@… | Owner: david
Type: defect | Status: assigned
Priority: normal | Milestone: 1.0.7
Component: testing | Version: 1.0.6
Severity: normal | Keywords:
Has_patch: 0 |
---------------------------------------------+------------------------------

Comment(by david):

(In [4881]) fix old tests to not use methods removed in PHPUnit 3.6
anymore (WTF?) and to use data providers instead of the dynamic test case
creation we did before data providers were in PHPUnit (that old way
doesn't work with PHPUnit 3.6 anymore), refs #1457

--
Ticket URL: <http://trac.agavi.org/ticket/1457#comment:5>

Agavi

unread,
Dec 4, 2011, 5:02:07 PM12/4/11
to tic...@lists.agavi.org
#1457: Fatal errors with PHPUnit 3.6
---------------------------------------------+------------------------------

Reporter: koen.vandaele@… | Owner: david
Type: defect | Status: assigned
Priority: normal | Milestone: 1.0.7
Component: testing | Version: 1.0.6
Severity: normal | Keywords:
Has_patch: 0 |
---------------------------------------------+------------------------------

Comment(by david):

(In [4880]) updated TestCaseMethod.tpl based on PHPUnit 3.5.15 (brought
back the lines we removed back then and commented them out for easier
updating in the future), this means we require 3.5.2 minimum because
strictMode() was called strictAssertions() before that (ah, so great,
public API breaks in micro versions!), refs #1457

--
Ticket URL: <http://trac.agavi.org/ticket/1457#comment:4>

Reply all
Reply to author
Forward
0 new messages