문제

I am trying to use Zend Test and PHPUnit to test an application I've built. I'm just in the early stages of getting things setup and have run into some problems (see this fun problem). But besides PHPUnit not being able to write the log file for whatever reason, the tests do run just fine (seemingly). However, if I try to use $this->assertResponseCode(200, 'some message'); I get the following error:

Declaration of Zend_Test_PHPUnit_Constraint_ResponseHeader::evaluate() should be compatible with PHPUnit_Framework_Constraint::evaluate($other, $description = '', $returnResult = false)

I've looked at the Zend Test code, and I'm pretty sure I'm passing the correct parameters. I've also searched for my issues and found this question. Any ideas on what I'm doing wrong?

I'm running the latest PHPUnit (3.6.12) from here and PHP 5.4 on Windows.

도움이 되었습니까?

해결책

From http://framework.zend.com/issues/browse/ZF-11828:

Closing as won't fix due to a collection of reasons:

Matthew has stated repeatedly that PHPUnit 3.4.x is the officially-supported version of ZFv1 Repeated attempts (both official and unofficial) have not yielded a workable PHAR archive of PHPUnit 3.4.x which could be bundled with ZFv1 Alternate solutions exist (ie: altroot PEAR install + PHPUnit 3.4.x)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top