Just mock it out.

You are not testing the getenv method, so do you really need you call it?

D.



On 8 May 2013 15:41, stef <ivan.d.stefano...@gmail.com> wrote:

> Hello,
>
> I have just started with ZF2 and I came across interesting problem. In a
> controller I'm using specific variables set in vhosts file with SetEnv. It
> is not a problem to get it there using getenv. But PHPUnit test fails on
> getenv function. Even if use getenv directly in unit test, result is the
> same.
>
> I have tried to initialize it in Bootstrap.php in conjunction with Ant but
> no luck. I have spent a day searching for solution on Google, but nothing
> worked.
>
> Did anyone had at least similar problem and how can I solve it?
>
> Thanks in advance,
> Ivan
>
>
>
> --
> View this message in context:
> http://zend-framework-community.634137.n4.nabble.com/Get-Apache-variable-in-PHPUnit-tests-tp4659961.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
> --
> List: fw-general@lists.zend.com
> Info: http://framework.zend.com/archives
> Unsubscribe: fw-general-unsubscr...@lists.zend.com
>
>
>

Reply via email to