Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If that is all there is to your test than i would assume your tests <a href="http://weierophinney.net/matthew/archives/182-Testing-Zend-Framework-MVC-Applications.html" rel="nofollow">looks like Matthew described</a>:</p> <pre><code>class UserControllerTest extends Zend_Test_PHPUnit_ControllerTestCase { // [...] public function testSomething() { $this-&gt;request -&gt;setMethod('POST') -&gt;setPost(array( 'username' =&gt; 'foobar', 'password' =&gt; 'foobar' )); $this-&gt;editAction(); // assertThatTheRightThingsHappend } } </code></pre> <p>and in that case i don't see any reason why it shouldn't be easy to get 100% Code Coverage.</p> <p>But yes: It is pretty hard to test Zend Framework Controllers and at some point you either have to try really hard to get all your application logic out of your controllers or just live with it.</p> <p>The same thing doesn't apply for your models though. Those should be really easy to test, even in a ZF Application.</p> <p>The purpose that code coverage serves is that it tells you what parts of your code base are not <em>even getting executed</em>. It doesn't tell you what is really tested and can only serve as a "minimum" to get an idea about the quality of your test suite (if you don't use @covers even that might lie to you).</p> <p>On short: If you have big controllers and an not so easy to change architecture just setting with so and so tested controllers but don't apply the same logic to your models. Nothing in ZF prevents you to properly test those</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload