Trying to run PHPUnit on my Kohana 2.3.4 install:
phpunit --colors --bootstrap=index.php ../../modules/phpunit/libraries/Tests.php
Getting an error in one of my modules:
<p><tt>modules/core/helpers/MY_url.php <strong>[118]:</strong></tt></p>
<p><code class="block">Undefined index: HTTP_HOST</code></p>
I understand that this is happening as I go through the command line, so HTTP_HOST will not be set. Is there any way around this without overwriting HTTP_HOST in this module? I know that I can rewrite it as exec (hostname), but try to avoid rewriting every instance of HTTP_HOST in my code.
Any workaround you can think of?
source
share