Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Needless limitation in assertResponseStatusCode() for console coltrollers #8

Open
hschletz opened this issue Nov 14, 2015 · 1 comment

Comments

@hschletz
Copy link

assertResponseStatusCode() and assertNotResponseStatusCode throw an exception for console controller tests if the argument is not 0 or 1.

I don't see a reason for this limitation. Exit codes can have a broad range of values, and it's common practice to report specific error conditions. A ZF console application works fine with arbitrary exit codes. There are platform-specific limitations, but these are outside the scope of the test routine.

I can work around the limitation:

$this->assertEquals(10, $this->getResponseStatusCode());

but unless I'm missing something, assertResponseStatusCode() should not perform any range checks at all.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-test; a new issue has been opened at laminas/laminas-test#7.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants